Welcome Guest, Not a member yet? Register   Sign In
Datamapper many to many relationship
#4

[eluser]WanWizard[/eluser]
From a code's point of view, there is no difference between getting one and getting all.

If you have a single (existing) user object, you can do
Code:
$user->role->get();
which will get all roles of that user (assuming 'role' is the name of your relation).


Messages In This Thread
Datamapper many to many relationship - by El Forum - 06-14-2013, 06:08 AM
Datamapper many to many relationship - by El Forum - 06-14-2013, 08:04 AM
Datamapper many to many relationship - by El Forum - 06-14-2013, 08:30 AM
Datamapper many to many relationship - by El Forum - 06-14-2013, 10:46 AM
Datamapper many to many relationship - by El Forum - 06-17-2013, 02:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB