mongoid/mongoid — Issue #1689: nested embedded_in work incorrectly when object was saved
Author: windy
Created: 2012-02-09 06:47:51+00:00
State: open

see a code example:

There are three models , as this:
```ruby
class User
include Mongoid::Document
embeds_many :projects
end

class Project
embedded_in :user
embeds_many :tasks
end

class Task
embedded_in :project
end
```

Now create them to use:
```
user = User.new
project = Project.new
task = Task.new
project.tasks << task
user.projects << project
user.save
```

Then query:
`user.reload.projects[0].tasks `
output
`[]` !!

I hope it should output `[task]`

I found this describe about this:
*Append one or many child addresses, saving them if the person is persisted*

Thx.