Hi all,
I'm having a problem in using inheritance in combination with multiple
ForeignKeys.
--------------------------------------------
from elixir import *
metadata.bind = 'sqlite:///mydbname.sqlite'
class A(Entity):
has_field('name', String)
using_options(shortnames=True, inheritance='multi',
polymorphic=True)
class B(A):
has_many('many_c', of_kind='C', inverse='some_b')
using_options(shortnames=True, inheritance='multi',
polymorphic=True)
class C(A):
belongs_to('some_b', of_kind='B', inverse='many_c')
using_options(shortnames=True, inheritance='multi',
polymorphic=True)
create_all()
--------------------------------------
Executing this example it gives me the following error:
sqlalchemy.exceptions.ArgumentError: Can't determine join between
'Join object on a b' and 'c'; tables have more than one foreign key
constraint relationship between them. Please specify the 'onclause' of
this join explicitly.
How can this problem be solved?
Regards,
Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---