On Jun 27, 12:46 am, "Michael Bayer" <mike...@zzzcomputing.com> wrote:
> "remote_side" referenced in the error message as well as the google groups
> messages you reference is an actual option you can set on relation() and
> backref(), and is required any time you have a self-referential
> many-to-one relation.   Since Client->Entity is self-referential and m2o
> its required, as "remote_side=Entity.id" (or entity_table.c.id).

I changed the relation declaration to use remote_side, but i get the
exact same stack trace on 0.5.4p2, and still no problem on 0.5.2.

Here is the modified relation declaration in the test code:

mapper(Entity,
       entity_table,
       polymorphic_on = entity_table.c.entity_type,
       polymorphic_identity = EntityType.Entity,
       properties = {
        'creator':
            relation(Client,
                     collection_class = set,
                     primaryjoin = entity_table.c.id_creator ==
entity_table.c.id,
                     foreign_keys = [entity_table.c.id_creator],
                     remote_side = [entity_table.c.id_creator],
                     backref = sqlalchemy.orm.backref
('entities_created',
                                                      foreign_keys =
[entity_table.c.id],
                                                      remote_side =
[entity_table.c.id]))})

--~--~---------~--~----~------------~-------~--~----~
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