{"action":"created","issue":{"url":"https://api.github.com/repos/schotime/NPoco/issues/492","repository_url":"https://api.github.com/repos/schotime/NPoco","labels_url":"https://api.github.com/repos/schotime/NPoco/issues/492/labels{/name}","comments_url":"https://api.github.com/repos/schotime/NPoco/issues/492/comments","events_url":"https://api.github.com/repos/schotime/NPoco/issues/492/events","html_url":"https://github.com/schotime/NPoco/issues/492","id":330661859,"node_id":"MDU6SXNzdWUzMzA2NjE4NTk=","number":492,"title":"Where clause does not return results when data has Underscore char","user":{"login":"radloori","id":34072668,"node_id":"MDQ6VXNlcjM0MDcyNjY4","avatar_url":"https://avatars0.githubusercontent.com/u/34072668?v=4","gravatar_id":"","url":"https://api.github.com/users/radloori","html_url":"https://github.com/radloori","followers_url":"https://api.github.com/users/radloori/followers","following_url":"https://api.github.com/users/radloori/following{/other_user}","gists_url":"https://api.github.com/users/radloori/gists{/gist_id}","starred_url":"https://api.github.com/users/radloori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radloori/subscriptions","organizations_url":"https://api.github.com/users/radloori/orgs","repos_url":"https://api.github.com/users/radloori/repos","events_url":"https://api.github.com/users/radloori/events{/privacy}","received_events_url":"https://api.github.com/users/radloori/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-08T13:38:03Z","updated_at":"2018-06-20T17:38:30Z","closed_at":null,"author_association":"NONE","body":"I have a table with some data with underscore char\r\n\r\nDetails\r\n```\r\nId     Name\r\n1      test_test\r\n```\r\n\r\nI have tried to search for test_test, but NPoco does not return anything.\r\n\r\nSample Query \r\n```\r\nvar searchString = \"TEST_TEST\";\r\nIQueryProvider<Details> query = DbConnection.Query<Details>();\r\nquery.Where(d=> d.Name.Contains(searchString))\r\n```\r\nActual Output:\r\n`[]`\r\n\r\nExpected Output:\r\n```\r\n[\r\n    {\r\n        \"Id\" : 1,\r\n        \"Name\": \"test_test\"\r\n    }\r\n]\r\n```\r\nI am using MySQL version: 5.7.20\r\n\r\nNPoco generated sql query\r\n```\r\nSELECT `D`.`Id` as `Id`, `D.Name` as `Name` \r\nWHERE upper(`D`.`Name`) like @0 escape '\\\\'\r\nLIMIT @1 OFFSET @2\r\n\t -> @0 [String] = \"%TEST\\\\_TEST%\"\r\n\t -> @1 [Int64] = \"10\"\r\n\t -> @2 [Int64] = \"0\"\r\n```"},"comment":{"url":"https://api.github.com/repos/schotime/NPoco/issues/comments/398835506","html_url":"https://github.com/schotime/NPoco/issues/492#issuecomment-398835506","issue_url":"https://api.github.com/repos/schotime/NPoco/issues/492","id":398835506,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODgzNTUwNg==","user":{"login":"radloori","id":34072668,"node_id":"MDQ6VXNlcjM0MDcyNjY4","avatar_url":"https://avatars0.githubusercontent.com/u/34072668?v=4","gravatar_id":"","url":"https://api.github.com/users/radloori","html_url":"https://github.com/radloori","followers_url":"https://api.github.com/users/radloori/followers","following_url":"https://api.github.com/users/radloori/following{/other_user}","gists_url":"https://api.github.com/users/radloori/gists{/gist_id}","starred_url":"https://api.github.com/users/radloori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radloori/subscriptions","organizations_url":"https://api.github.com/users/radloori/orgs","repos_url":"https://api.github.com/users/radloori/repos","events_url":"https://api.github.com/users/radloori/events{/privacy}","received_events_url":"https://api.github.com/users/radloori/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T17:38:30Z","updated_at":"2018-06-20T17:38:30Z","author_association":"NONE","body":"I am attaching a sample project to reproduce this issue. \r\n\r\nNote: Please change the Mysql connection string \r\n\r\n[ConsoleApp5.zip](https://github.com/schotime/NPoco/files/2120443/ConsoleApp5.zip)\r\n"}}
{"actor":{"display_login":"radloori"}}