{"action":"created","issue":{"url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/359","labels_url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/359/labels{/name}","comments_url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/359/comments","events_url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/359/events","html_url":"https://github.com/lightblue-platform/lightblue-core/issues/359","id":65548469,"number":359,"title":"Associations broken?","user":{"login":"jblashka","id":6685705,"avatar_url":"https://avatars.githubusercontent.com/u/6685705?v=3","gravatar_id":"","url":"https://api.github.com/users/jblashka","html_url":"https://github.com/jblashka","followers_url":"https://api.github.com/users/jblashka/followers","following_url":"https://api.github.com/users/jblashka/following{/other_user}","gists_url":"https://api.github.com/users/jblashka/gists{/gist_id}","starred_url":"https://api.github.com/users/jblashka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jblashka/subscriptions","organizations_url":"https://api.github.com/users/jblashka/orgs","repos_url":"https://api.github.com/users/jblashka/repos","events_url":"https://api.github.com/users/jblashka/events{/privacy}","received_events_url":"https://api.github.com/users/jblashka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-31T21:13:41Z","updated_at":"2015-04-01T12:48:51Z","closed_at":null,"body":"Two simple entities:\r\nEntity jA with a 'thing' string field\r\nEntity jB with an 'a_thing' string field and reference to the A entity using jB's a_thing and jA's thing\r\n\r\nData:\r\nInsert two jA objects with \"thing\" = \"blah\". Insert two jA objects with \"thing\" = \"blaha\".\r\nInsert one jB object with \"a_thing\" = \"blah\". Insert one jB object with \"a_thing\" = \"blaha\".\r\n\r\nQuery:\r\nQuery for objectType = jB. Project * and field A.\r\n\r\nResult:\r\nEach returned jB documents has all four jA documents in the A field.\r\n\r\n@bserdar @jewzaam any ideas?\r\n"},"comment":{"url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/comments/88466792","html_url":"https://github.com/lightblue-platform/lightblue-core/issues/359#issuecomment-88466792","issue_url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/359","id":88466792,"user":{"login":"jewzaam","id":480388,"avatar_url":"https://avatars.githubusercontent.com/u/480388?v=3","gravatar_id":"","url":"https://api.github.com/users/jewzaam","html_url":"https://github.com/jewzaam","followers_url":"https://api.github.com/users/jewzaam/followers","following_url":"https://api.github.com/users/jewzaam/following{/other_user}","gists_url":"https://api.github.com/users/jewzaam/gists{/gist_id}","starred_url":"https://api.github.com/users/jewzaam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jewzaam/subscriptions","organizations_url":"https://api.github.com/users/jewzaam/orgs","repos_url":"https://api.github.com/users/jewzaam/repos","events_url":"https://api.github.com/users/jewzaam/events{/privacy}","received_events_url":"https://api.github.com/users/jewzaam/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T12:48:51Z","updated_at":"2015-04-01T12:48:51Z","body":"@bserdar going to push that unit test in a PR?\n\n----- Original Message -----\n> Do you have the latest deployed? Something newer than mid-last week?\n> \n> I wrote a unit test to replicate this, and it works as expected.\n> \n> https://github.com/bserdar/lightblue-core/commit/3fabe3bbf252f33e9b5c1c5caf3b4e4bc25b9efc\n> \n> On Tue, Mar 31, 2015 at 4:01 PM, Naveen Malik <notifications@github.com>\n> wrote:\n> \n> > {\n> >     \"entityInfo\": {\n> >         \"name\": \"jA\",\n> >         \"indexes\": [\n> >             {\n> >                 \"name\": null,\n> >                 \"unique\": true,\n> >                 \"fields\": [\n> >                     {\n> >                         \"field\": \"_id\",\n> >                         \"dir\": \"$asc\"\n> >                     }\n> >                 ]\n> >             }\n> >         ],\n> >         \"datastore\": {\n> >             \"datasource\": \"mongodata\",\n> >             \"collection\": \"jA\",\n> >             \"backend\": \"mongo\"\n> >         }\n> >     },\n> >     \"schema\": {\n> >         \"name\": \"jA\",\n> >         \"version\": {\n> >             \"value\": \"1.0.1-SNAPSHOT\",\n> >             \"changelog\": \"Jared's association test\"\n> >         },\n> >         \"status\": {\n> >             \"value\": \"active\"\n> >         },\n> >         \"access\": {\n> >             \"insert\": [\n> >                 \"anyone\"\n> >             ],\n> >             \"update\": [\n> >                 \"anyone\"\n> >             ],\n> >             \"find\": [\n> >                 \"anyone\"\n> >             ],\n> >             \"delete\": [\n> >                 \"anyone\"\n> >             ]\n> >         },\n> >         \"fields\": {\n> >             \"b_id\": {\n> >                 \"type\": \"string\"\n> >             },\n> >             \"_id\": {\n> >                 \"type\": \"uid\",\n> >                 \"constraints\": {\n> >                     \"identity\": true\n> >                 }\n> >             },\n> >             \"objectType\": {\n> >                 \"type\": \"string\",\n> >                 \"access\": {\n> >                     \"find\": [\n> >                         \"anyone\"\n> >                     ],\n> >                     \"update\": [\n> >                         \"noone\"\n> >                     ]\n> >                 },\n> >                 \"constraints\": {\n> >                     \"minLength\": 1,\n> >                     \"required\": true\n> >                 }\n> >             },\n> >             \"thing\": {\n> >                 \"type\": \"string\"\n> >             }\n> >         }\n> >     }\n> > }\n> >\n> > {\n> >     \"entityInfo\": {\n> >         \"name\": \"jB\",\n> >         \"indexes\": [\n> >             {\n> >                 \"name\": null,\n> >                 \"unique\": true,\n> >                 \"fields\": [\n> >                     {\n> >                         \"field\": \"_id\",\n> >                         \"dir\": \"$asc\"\n> >                     }\n> >                 ]\n> >             }\n> >         ],\n> >         \"datastore\": {\n> >             \"datasource\": \"mongodata\",\n> >             \"collection\": \"jB\",\n> >             \"backend\": \"mongo\"\n> >         }\n> >     },\n> >     \"schema\": {\n> >         \"name\": \"jB\",\n> >         \"version\": {\n> >             \"value\": \"1.0.1-SNAPSHOT\",\n> >             \"changelog\": \"Jareds association test 2\"\n> >         },\n> >         \"status\": {\n> >             \"value\": \"active\"\n> >         },\n> >         \"access\": {\n> >             \"insert\": [\n> >                 \"anyone\"\n> >             ],\n> >             \"update\": [\n> >                 \"anyone\"\n> >             ],\n> >             \"find\": [\n> >                 \"anyone\"\n> >             ],\n> >             \"delete\": [\n> >                 \"anyone\"\n> >             ]\n> >         },\n> >         \"fields\": {\n> >             \"a_thing\": {\n> >                 \"type\": \"string\"\n> >             },\n> >             \"_id\": {\n> >                 \"type\": \"uid\",\n> >                 \"constraints\": {\n> >                     \"identity\": true\n> >                 }\n> >             },\n> >             \"A\": {\n> >                 \"type\": \"reference\",\n> >                 \"entity\": \"jA\",\n> >                 \"versionValue\": \"1.0.1-SNAPSHOT\",\n> >                 \"projection\": {\n> >                     \"field\": \"*\",\n> >                     \"include\": true,\n> >                     \"recursive\": true\n> >                 },\n> >                 \"query\": {\n> >                     \"field\": \"thing\",\n> >                     \"op\": \"$eq\",\n> >                     \"rfield\": \"$parent.a_thing\"\n> >                 },\n> >                 \"sort\": [\n> >                     {\n> >                         \"_id\": \"$asc\"\n> >                     }\n> >                 ]\n> >             },\n> >             \"objectType\": {\n> >                 \"type\": \"string\",\n> >                 \"access\": {\n> >                     \"find\": [\n> >                         \"anyone\"\n> >                     ],\n> >                     \"update\": [\n> >                         \"noone\"\n> >                     ]\n> >                 },\n> >                 \"constraints\": {\n> >                     \"minLength\": 1,\n> >                     \"required\": true\n> >                 }\n> >             }\n> >         }\n> >     }\n> > }\n> >\n> > —\n> > Reply to this email directly or view it on GitHub\n> > <https://github.com/lightblue-platform/lightblue-core/issues/359#issuecomment-88265605>\n> > .\n> >\n> \n> \n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/lightblue-platform/lightblue-core/issues/359#issuecomment-88324283\n"}}