On 11/29/06, Anton V. Belyaev <[EMAIL PROTECTED]> wrote:
>
>
> Stuart Clarke wrote:
> > On Tue, 2006-11-28 at 06:15 -0800, Anton V. Belyaev wrote:
> > > Hello,
> > >
> > > Could you pleas explain, why MultipleJoin is needed in One-To-Many
> > > relationship?
> > >
> > > For example we have:
> > >
> > > class Element(SQLObject):
> > > name = StringCol()
> > > set = ForeignKey('Set')
> > >
> > > class Set(SQLObject):
> > > set_name = StringCol()
> > > elements = MultipleJoin('Element')
> > >
> > > I think ForeignKey is enought for One-To-Many:
> > > Set::elements can be done as list(Element.selectBy(test = test_id))
> >
> > *** Because it's much more convenient to say:
> >
> > some_elements = set.elements
> >
> > Stuart
>
> So MultipleJoin does not create additional table as RelatedJoin does.
> Right?
if you look at the actual db you will see that there is one entry on
one table that points to many on the other is a simple SQL construct.
the "back reference" is at the ORM layer
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---