{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/waterline/issues/429","labels_url":"https://api.github.com/repos/balderdashy/waterline/issues/429/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/waterline/issues/429/comments","events_url":"https://api.github.com/repos/balderdashy/waterline/issues/429/events","html_url":"https://github.com/balderdashy/waterline/issues/429","id":33616013,"number":429,"title":"One-to-many Relationship saves embedded collections","user":{"login":"halissonvit","id":379034,"avatar_url":"https://avatars.githubusercontent.com/u/379034?v=3","gravatar_id":"","url":"https://api.github.com/users/halissonvit","html_url":"https://github.com/halissonvit","followers_url":"https://api.github.com/users/halissonvit/followers","following_url":"https://api.github.com/users/halissonvit/following{/other_user}","gists_url":"https://api.github.com/users/halissonvit/gists{/gist_id}","starred_url":"https://api.github.com/users/halissonvit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halissonvit/subscriptions","organizations_url":"https://api.github.com/users/halissonvit/orgs","repos_url":"https://api.github.com/users/halissonvit/repos","events_url":"https://api.github.com/users/halissonvit/events{/privacy}","received_events_url":"https://api.github.com/users/halissonvit/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/balderdashy/waterline/labels/bug","name":"bug","color":"800000"},{"url":"https://api.github.com/repos/balderdashy/waterline/labels/needs%20fix","name":"needs fix","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/balderdashy/waterline/milestones/7","html_url":"https://github.com/balderdashy/waterline/milestones/Work%20In%20Progress","labels_url":"https://api.github.com/repos/balderdashy/waterline/milestones/7/labels","id":586108,"number":7,"title":"Work In Progress","description":"Things that are currently being worked on.","creator":{"login":"particlebanana","id":370260,"avatar_url":"https://avatars.githubusercontent.com/u/370260?v=3","gravatar_id":"","url":"https://api.github.com/users/particlebanana","html_url":"https://github.com/particlebanana","followers_url":"https://api.github.com/users/particlebanana/followers","following_url":"https://api.github.com/users/particlebanana/following{/other_user}","gists_url":"https://api.github.com/users/particlebanana/gists{/gist_id}","starred_url":"https://api.github.com/users/particlebanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/particlebanana/subscriptions","organizations_url":"https://api.github.com/users/particlebanana/orgs","repos_url":"https://api.github.com/users/particlebanana/repos","events_url":"https://api.github.com/users/particlebanana/events{/privacy}","received_events_url":"https://api.github.com/users/particlebanana/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":27,"state":"closed","created_at":"2014-03-03T19:10:59Z","updated_at":"2015-04-20T10:32:09Z","due_on":null,"closed_at":"2015-04-20T10:32:09Z"},"comments":18,"created_at":"2014-05-15T19:16:22Z","updated_at":"2015-04-20T17:31:43Z","closed_at":null,"body":"Hi,\r\nNot sure if this is the expected behavior, since we should have only relations right?\r\n\r\nI've the following models:\r\n\r\n``` \r\n/** User.js */\r\nmodule.exports = {\r\n  attributes: {\r\n    name: \"String\",\r\n\t  profiles: { collection: 'Profile', via: 'user' }\r\n  }\r\n};\r\n```\r\n\r\n```\r\n/** Profile.js */\r\nmodule.exports = {\r\n\tattributes: {\r\n\t\temail: 'email',\r\n\t\tuser: { model: 'User' }\r\n\t}\r\n};\r\n```\r\n\r\nWhen trying to create an user with the JSON:\r\n\r\n```\r\n{\r\n  \"name\": \"user\",\r\n  \"profiles\": [\r\n    {\r\n      \"email\": \"user@user.com\"\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nIt's creating an embedded collection on mongo:\r\n\r\n```\r\n/* 0 */\r\n{\r\n    \"_id\" : ObjectId(\"53750b6fc35a49901fb6efa9\"),\r\n    \"name\" : \"user\",\r\n    \"profiles\" : [ \r\n        {\r\n            \"email\" : \"user@user.com\"\r\n        }\r\n    ],\r\n    \"createdAt\" : ISODate(\"2014-05-15T18:46:07.543Z\"),\r\n    \"updatedAt\" : ISODate(\"2014-05-15T18:46:07.550Z\")\r\n}\r\n```\r\n\r\nI'm using the following packages:\r\n```\r\n\"sails\": \"~0.10.0-rc7\", ----> \"waterline\": \"0.10.0-rc12\",\r\n\"sails-mongo\": \"0.10.0-rc4\",\r\n```\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/balderdashy/waterline/issues/comments/94517301","html_url":"https://github.com/balderdashy/waterline/issues/429#issuecomment-94517301","issue_url":"https://api.github.com/repos/balderdashy/waterline/issues/429","id":94517301,"user":{"login":"devinivy","id":3150233,"avatar_url":"https://avatars.githubusercontent.com/u/3150233?v=3","gravatar_id":"","url":"https://api.github.com/users/devinivy","html_url":"https://github.com/devinivy","followers_url":"https://api.github.com/users/devinivy/followers","following_url":"https://api.github.com/users/devinivy/following{/other_user}","gists_url":"https://api.github.com/users/devinivy/gists{/gist_id}","starred_url":"https://api.github.com/users/devinivy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinivy/subscriptions","organizations_url":"https://api.github.com/users/devinivy/orgs","repos_url":"https://api.github.com/users/devinivy/repos","events_url":"https://api.github.com/users/devinivy/events{/privacy}","received_events_url":"https://api.github.com/users/devinivy/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T17:31:43Z","updated_at":"2015-04-20T17:31:43Z","body":"@dmarcelino is there a typo up there?  Seems that one of those \"sails-orientdb\" should be \"waterline\", but I don't know which one!"}}