Thanks I think I had tried something like this before...  Anyway, now
I'm defining the relation from Content to ContentCollection and
separately from ContentCollection back to Content, but I'm running
into the chicken and the egg problem...  The mapper expects a class,
but I can't define Content before ContentCollection and
ContentCollection before Content...

thx

m

On Jun 22, 11:32 pm, [EMAIL PROTECTED] wrote:
> u may need an explicit intermediate association object, see the docs
> about "many to many" relations.
> Instead of directly getting the children, u'll get the associations
> via which u can get the children, or whatever attributes of the link.
> Then if u want a direct children-list, u can make some python property
> to do that i.e. return [x.child for x in me.children_links].
>
> > Hi, I have a relation I'm mapping through an intermediate table and
> > it seems to work fine, it looks something like:
>
> > Content -> ContentCollection -> Content
>
> > 'collection_children':relation(Content,
> >                                secondary     = content_collection,
> >                                primaryjoin   = content.c.id ==
> > content_collection.c.collection_id,
> >                                secondaryjoin =
> > content_collection.c.content_id == content.c.id,
> >                                order_by      =
> > content_collection.c.priority,
> >                               ),
>
> > The trouble is, I want to be able to set a couple fields on the
> > ContentCollection table, but I don't actually have a property for
> > those fields on the Content object anywhere since I'm mapping
> > through that table...  Any ideas on how I should handle this?
>
> > thx
>
> > Matt


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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