Welcome Guest, Not a member yet? Register   Sign In
DataMapper: does set_join_field() create a new record or only update an existing one?
#2

[eluser]WanWizard[/eluser]
That is correct.

As long as the relation isn't created, there is no relation record in the join table, and therefore nothing to set.

Technically:

It will do an "UPDATE books_users SET value = 1 WHERE book_id = 99 AND user_id = 1" which will update 0 records as that combination of keys does not exist yet.


Messages In This Thread
DataMapper: does set_join_field() create a new record or only update an existing one? - by El Forum - 05-12-2012, 04:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB