Welcome Guest, Not a member yet? Register   Sign In
One-way relationships with DataMapper?
#9

[eluser]WanWizard[/eluser]
That text is related to the intro above the table, which starts with "If we decide to use a join table, that table is a little different..."

Datamapper allows you to use a join table, even on a has_one relation. If it exists, it will be used. If not, an ITFK will be used.

You will usually opt for a join table if your relationship has properties, which you would have to store in the join table (for example, the timestamp of when the relation was made). Although technically with a has_one you could store these fields in the 'one' table together with the ITFK, it's not a very clean solution.


Messages In This Thread
One-way relationships with DataMapper? - by El Forum - 07-01-2011, 05:29 PM
One-way relationships with DataMapper? - by El Forum - 07-01-2011, 06:26 PM
One-way relationships with DataMapper? - by El Forum - 07-02-2011, 03:13 AM
One-way relationships with DataMapper? - by El Forum - 07-02-2011, 09:13 AM
One-way relationships with DataMapper? - by El Forum - 07-02-2011, 09:44 AM
One-way relationships with DataMapper? - by El Forum - 07-02-2011, 11:23 AM
One-way relationships with DataMapper? - by El Forum - 07-02-2011, 01:50 PM
One-way relationships with DataMapper? - by El Forum - 07-02-2011, 03:32 PM
One-way relationships with DataMapper? - by El Forum - 07-02-2011, 04:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB