{"action":"opened","issue":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/1024","labels_url":"https://api.github.com/repos/keystonejs/keystone/issues/1024/labels{/name}","comments_url":"https://api.github.com/repos/keystonejs/keystone/issues/1024/comments","events_url":"https://api.github.com/repos/keystonejs/keystone/issues/1024/events","html_url":"https://github.com/keystonejs/keystone/issues/1024","id":57107258,"number":1024,"title":"Support inline/embedded relationship references","user":{"login":"webteckie","id":5872515,"avatar_url":"https://avatars.githubusercontent.com/u/5872515?v=3","gravatar_id":"","url":"https://api.github.com/users/webteckie","html_url":"https://github.com/webteckie","followers_url":"https://api.github.com/users/webteckie/followers","following_url":"https://api.github.com/users/webteckie/following{/other_user}","gists_url":"https://api.github.com/users/webteckie/gists{/gist_id}","starred_url":"https://api.github.com/users/webteckie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webteckie/subscriptions","organizations_url":"https://api.github.com/users/webteckie/orgs","repos_url":"https://api.github.com/users/webteckie/repos","events_url":"https://api.github.com/users/webteckie/events{/privacy}","received_events_url":"https://api.github.com/users/webteckie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-09T23:32:37Z","updated_at":"2015-02-09T23:32:37Z","closed_at":null,"body":"Sometimes it is useful to keep certain content in its own model, yet, being able to embed it in another model seamlessly.  This is a proposal to handle this by supporting inline relationship references.  With inline relationship references, keystone would populate the referenced relationship item(s) inline when displaying the containing item in the Admin UI as if the content was actually part of the containing item model.  This would also require the Admin UI to support creating the embedded content inline as well. The following is an example of how such field would be configured:\r\n\r\n```\r\ntheThing: { type: Types.Relationship, ref: 'Thing', many: false, inline: true }\r\n\r\nor\r\n\r\ntheThings: { type: Types.Relationship, ref: 'Thing', many: true, inline: true, sort: -createdAt, limit: 1 }\r\n```\r\n\r\nNOTE:  instead of the sort/limit attributes, perhaps allowing for configuring a mongoose query and projection would be even more powerful.\r\n"}}