Welcome Guest, Not a member yet? Register   Sign In
Datamapper deep relationships
#2

[eluser]WanWizard[/eluser]
I can't comment on that.

This shows a model called "Post" which has a "has_one" to "parent" and a "has_many" to "childrens". It doesn't show the relations between "parent" and "childrens", which is what is used when you specify "parent/childrens".

Second point is that in a relationship definition, "class" points the the model class the relationship is pointing to. Which in this example is the "Post" model itself?


Messages In This Thread
Datamapper deep relationships - by El Forum - 10-01-2012, 08:38 AM
Datamapper deep relationships - by El Forum - 10-01-2012, 09:45 AM
Datamapper deep relationships - by El Forum - 10-02-2012, 04:24 AM
Datamapper deep relationships - by El Forum - 10-02-2012, 06:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB