purekid / mongodm

MongoDB ORM that includes support for references,embed and multilevel inheritance.
MIT License
200 stars 47 forks source link

Adding to a Collection #5

Closed squidge closed 11 years ago

squidge commented 11 years ago

Hi,

$a references $b

a) this works well $b->save() $a->b = Collection::make(array(new b)); $a->save()

b) this seems to work $b->save() $a->b->add(new b); $a->save(); however when I read $a later on $a->b is empty I am reading $a with A::id(..)

What am I doing wrong in b) ?

purekid commented 11 years ago

I have fixed this bug,please udpate mongodm to lastest version.