{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"closed","user":{"avatar_url":"https://secure.gravatar.com/avatar/f5dcb5f94bda9396909b08cafbd82edb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f5dcb5f94bda9396909b08cafbd82edb","url":"https://api.github.com/users/prinzC","login":"prinzC","id":736697},"milestone":null,"updated_at":"2011-11-10T01:12:24Z","labels":[{"name":"needs info","color":"444444","url":"https://api.github.com/repos/mongoid/mongoid/labels/needs+info"}],"assignee":null,"closed_at":"2011-11-10T01:12:24Z","comments":2,"url":"https://api.github.com/repos/mongoid/mongoid/issues/1417","body":"I've got the document (book with nested chapters with nested sections): \r\n\r\n<code>book: {:title: \"Book Title\", \"chapters\":[{title: \"Chapter I\", \"sections\":[{},{}] }, {...} ]}</code>\r\n\r\nIf I want to get book without chapters I say \r\n<code>books[0].without(\"chapters\").chapters ==> [] #i've got empty array</code>\r\n\r\n<code>books[0].chapters[0].without(\"sections\").sections ==> [.....] # I've got full array</code>","html_url":"https://github.com/mongoid/mongoid/issues/1417","number":1417,"title":"Methods \"only\" and \"without\" do not work on nested docs?","id":2181885,"created_at":"2011-11-09T01:22:57Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/f5dcb5f94bda9396909b08cafbd82edb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f5dcb5f94bda9396909b08cafbd82edb","url":"https://api.github.com/users/prinzC","login":"prinzC","id":736697},"updated_at":"2011-11-10T01:12:24Z","url":"https://api.github.com/repos/mongoid/mongoid/issues/comments/2690245","body":"Thanks. It was my mistake. \"Only\" can be used only on collection docs not on embedded as I tried, i needed to write:\r\nbooks[0].without(\"chapters.sections\").chapters -> []\r\nClosed (or even would be better if deleted)","id":2690245,"created_at":"2011-11-10T01:12:24Z"}}