[dev] Horde_Rdo: Many-to-many-relations between objects of the same type?
Jan Schneider
jan at horde.org
Mon Aug 22 16:23:11 UTC 2011
Zitat von Ralf Lang <lang at b1-systems.de>:
> Hi,
>
> I wonder how I do many-to-many between objects of the same type/table in
> horde_rdo.
>
> $alice->allowsCall($bob);
> array($alice) = $bob->mayCall();
>
> Maybe it's a bad example as permissions could be handled by Horde_Perms but
> the point is I fail finding a suitable setup of the relations array to
> identify the two distinct participants in the 'through' table.
>
> I could cheat myself out by making CallPermission an entity of its own but I
> have no distinct data to tell about CallPermission other than who allows and
> who is allowed.
Just a shot in the dark, but why does setting 'mapper' to "itself" not
work? Or are you wondering about the 'though' table layout?
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the dev
mailing list