cool thx.

On 4/13/07, svilen <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a Parent - Child (1:N) relationship between Class and Exam
> > table.
> >
> > Class -> Exam
> >   1       :    N
> >
> > Now since a "Class" could have millions of "Exam" I don't want have
> > an attribute on Class called exams. Instead I only want an
> > attribute on "Exam" to the parent "Class".
> >
> > Can we do this in SA ?
> >
> > Will do the below do the job ? Just asking out of curiosity without
> > testing.
> >
> > mapper(Exam, examtable, properties = {class: relation(Class)})
>
> yes, u'll get the other side only if u require backref=something
>
> also do specify relation( ,,,, uselist=False,) as it mistakes
> sometimes.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to