Hey,

Michael Bayer wrote:
[snip]
> OK well I'm sure you noticed that RelationProperty was not designed to be
> subclassed.   I would advise that your my_own_relation() function generate
> its own primaryjoin and secondaryjoin conditions which it passes as
> arguments to the relation().  

Looking at it again, I don't think that this is actually possible, as 
the custom relation function lacks the information to determine what is 
the parent and the child and therefore cannot construct a join.

Take the following:

mapper(B, b,
        properties={
          'a': my_own_relation(A, backref='bs'),
        })

How in the implementation of my_own_relation am I to find out about B? I 
think this is only possible to do when do_init() is called on the 
relation property.

Regards,

Martijn


--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to