On May 11, 2007, at 8:26 AM, Alchemist wrote:

>
> I tried using entity_name and it works for me.  Mappers are identified
> by the entity_name parameter.
>
> However, table relations are not being mapped as they should.
>
> How can I set the table relations when I am using entity_name
> parameter for a mapper?
>

you need to put the actual mapper instance in the relation(), i.e.

m1 = mapper(MyClass, sometable, entity_name='foo')
m2 = mapper(OtherClass, othertable, entity_name='bar', properties={
        'm1s':relation(m1)
})

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