{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-connector-postgresql/issues/70","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-postgresql/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-postgresql/issues/70/comments","events_url":"https://api.github.com/repos/strongloop/loopback-connector-postgresql/issues/70/events","html_url":"https://github.com/strongloop/loopback-connector-postgresql/issues/70","id":67311768,"number":70,"title":"ReferencesMany and \"inq\" filter on id result in error","user":{"login":"bkniffler","id":4349324,"avatar_url":"https://avatars.githubusercontent.com/u/4349324?v=3","gravatar_id":"","url":"https://api.github.com/users/bkniffler","html_url":"https://github.com/bkniffler","followers_url":"https://api.github.com/users/bkniffler/followers","following_url":"https://api.github.com/users/bkniffler/following{/other_user}","gists_url":"https://api.github.com/users/bkniffler/gists{/gist_id}","starred_url":"https://api.github.com/users/bkniffler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkniffler/subscriptions","organizations_url":"https://api.github.com/users/bkniffler/orgs","repos_url":"https://api.github.com/users/bkniffler/repos","events_url":"https://api.github.com/users/bkniffler/events{/privacy}","received_events_url":"https://api.github.com/users/bkniffler/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-09T08:50:49Z","updated_at":"2015-04-09T09:41:33Z","closed_at":"2015-04-09T09:41:33Z","body":"Hey, \r\nI set up a referencesMany relation between objects, now when I run something like this:\r\n```\r\nhttp://localhost:3010/api/Entries?filter={\"where\":{\"tagIds\":{\"inq\":[2]}}}\r\n```\r\nI get the following error\r\n```\r\n{\"error\":{\"name\":\"error\",\"status\":500,\"message\":\"operator does not exist: character varying = integer\",\"length\":208,\"severity\":\"ERROR\",\"code\":\"42883\",\"hint\":\"No operator matches the given name and argument type(s). You might need to add explicit type casts.\",\"position\":\"196\",\"file\":\"parse_oper.c\",\"line\":\"722\",\"routine\":\"op_error\",\"stack\":\"error: operator does not exist: character varying = integer\\n    \r\nat Connection.parseE (.../node_modules/pg/lib/connection.js:534:11)\\n    \r\nat Connection.parseMessage (.../node_modules/pg/lib/connection.js:361:17)\\n    \r\nat Socket.<anonymous> (.../node_modules/pg/lib/connection.js:105:22)\\n    \r\nat emitOne (events.js:75:13)\\n    \r\nat Socket.emit (events.js:150:7)\\n    \r\nat readableAddChunk (_stream_readable.js:146:16)\\n    \r\nat Socket.Readable.push (_stream_readable.js:109:10)\\n    \r\nat TCP.onread (net.js:510:20)\"}}\r\n```\r\n\r\n```\r\nEntry.json\r\n{\r\n  \"name\": \"Entry\",\r\n  \"plural\": \"Entries\",\r\n  \"base\": \"PersistedModel\",\r\n  \"properties\": {\r\n    \"name\": {\r\n      \"type\": \"string\",\r\n      \"required\": true\r\n    },\r\n  },\r\n  \"relations\": {\r\n    \"tags\": {\r\n      \"type\": \"referencesMany\",\r\n      \"model\": \"Tag\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n```\r\nTag.json\r\n{\r\n  \"name\": \"Tag\",\r\n  \"plural\": \"Tags\",\r\n  \"base\": \"PersistedModel\",\r\n  \"properties\": {\r\n    \"name\": {\r\n      \"type\": \"string\",\r\n      \"required\": true\r\n    }\r\n  },\r\n  \"relations\": {\r\n    \"entries\": {\r\n      \"type\": \"hasAndBelongsToMany\",\r\n      \"model\": \"Entry\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nAm I missing something or is this a bug?"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-connector-postgresql/issues/comments/91175858","html_url":"https://github.com/strongloop/loopback-connector-postgresql/issues/70#issuecomment-91175858","issue_url":"https://api.github.com/repos/strongloop/loopback-connector-postgresql/issues/70","id":91175858,"user":{"login":"bkniffler","id":4349324,"avatar_url":"https://avatars.githubusercontent.com/u/4349324?v=3","gravatar_id":"","url":"https://api.github.com/users/bkniffler","html_url":"https://github.com/bkniffler","followers_url":"https://api.github.com/users/bkniffler/followers","following_url":"https://api.github.com/users/bkniffler/following{/other_user}","gists_url":"https://api.github.com/users/bkniffler/gists{/gist_id}","starred_url":"https://api.github.com/users/bkniffler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkniffler/subscriptions","organizations_url":"https://api.github.com/users/bkniffler/orgs","repos_url":"https://api.github.com/users/bkniffler/repos","events_url":"https://api.github.com/users/bkniffler/events{/privacy}","received_events_url":"https://api.github.com/users/bkniffler/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T09:41:33Z","updated_at":"2015-04-09T09:41:33Z","body":"Well, I guess I missed the point that its supposed to work the other way around. What I'm trying to achieve is currently not possible, I think I'd need JSON field types to run \"contains\" operations on arrays."}}