[prev in list] [next in list] [prev in thread] [next in thread]
List: horde-dev
Subject: Re: [dev] Horde_Rdo: Many-to-many-relations between objects of the
From: Ralf Lang <lang () b1-systems ! de>
Date: 2011-08-22 18:57:35
Message-ID: 201108222057.35194.lang () b1-systems ! de
[Download RAW message or body]
Am Montag, 22. August 2011, 18:23:11 schrieb Jan Schneider:
> Zitat von Ralf Lang <lang@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?
Probably I have done it wrong.
Obviously the two columns in the through-table have different names, but the
key field for the mapping is the same on both sides.
I have built a "fake" mapper now for the through table and solved it as one-
to-many but it's probably only the second best solution.
--
Ralf Lang
Linux Consultant / Developer
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
--
Horde developers mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: dev-unsubscribe@lists.horde.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic