Hi guys,
I was messing around with the new branch and found some problems.
Here's the code:
from elixir import *
class Group(Entity):
has_field('name', Unicode(), primary_key=True)
class Test(Entity):
belongs_to('person', of_kind="Person",
column_kwargs={'primary_key':True})
class Person(Entity):
belongs_to('group', of_kind="Group",
column_kwargs={'primary_key':True})
using_options(auto_primarykey=False)
1) Without auto_primarykey=False in Person, the automatic 'id' field
is created; I didn't expect that to happen, since there is a primary
key specified.
2) Test does not get a Foreign Key from Person when this is run, as
the Test->Person relationship is resolved before the Person->Group
relationship, as you can see here:
$ ipython
test
In [1]: Test.table
BT::create_keys person Test
BT::create_keys group Person
BT::create_properties person Test
BT::create_properties group Person
Out[1]:
Table('__main___test',DynamicMetaData(),Column('id',Integer(),primary_key=True,nullable=False),schema=None)
Sorry I don't have anything more to offer than problems. I'll look at
how I can help when I get some time.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---