I'm trying to make an update of many tables with its foreign keys, following the Object-Document Mapper. I don't really know which method will be "better" to use, or when I must to use the correct method.
I would say
update() because I want to update my database. But Invo and Vökuró projects use
save() to update its database, as far as I know...
This is what I actually do:
$email = $this->request->getPost('email', 'email'); $name = $this->request->getPost('name'); // Some many more gets $user = Users::findFirstById($id); $user->email = $email; $user_info = new UsersInfo(); $user_info->name = $name; // Some many more relational mapping. $res=$user->save(); var_dump($res); // it shows Bool(false)
So the tables never become changed. What I'm doing wrong. Which is the optimal method to proceed in this case?
Thanks for reading and please forgive my bad english ;-(