-------------
im not sure if this is a bug or the way it should be working.
It seems that if we addOne() to a new object, and save the parent object, the child object and parent object get saved.
But if we edit an existing parent object, and use addOne, the child object did not get saved when i call parentobject->save()...
Please note that the parent object is not modified in my case.
It seems that if we addOne() to a new object, and save the parent object, the child object and parent object get saved.
But if we edit an existing parent object, and use addOne, the child object did not get saved when i call parentobject->save()...
Please note that the parent object is not modified in my case.
updates: dec 13: relying on addOne to save record is not recommended. Best to set the foreign key value manually.
Hope this help ya :)
Cheers~
Hope this help ya :)
Cheers~
No comments:
Post a Comment