the use_alter=True raises this error:
ForeignKeyConstraint(['id_operatore'],['operatore.id'],use_alter=True),
File "/usr/lib/python2.4/site-packages/sqlalchemy/schema.py", line
701, in __init__
raise exceptions.ArgumentError("Alterable
ForeignKey/ForeignKeyConstraint requires a name")
Michael Bayer wrote:
>specify use_alter=True to one or both ForeignKey constructs.
>
>
>On Dec 6, 2008, at 12:37 PM, jose wrote:
>
>
>
>>Hi all,
>>
>>I have two tables in my schema with circular references and I don't
>>know
>>hot to create them.
>>
>>
>>tbl['anagrafica']=Table('anagrafica',database.metadata,
>> Column('id', Integer, Sequence('anagrafica_id_seq'),
>>primary_key=True, nullable=False),
>> Column('nome', Unicode(200), nullable=False, index=True,
>>case_sensitive=True),
>> Column('id_operatore', Integer, ForeignKey('operatore.id'))
>>)
>>tbl['operatore']=Table('operatore',database.metadata,
>> Column('id', Integer, Sequence('operatore_id_seq'),
>>nullable=False, primary_key=True),
>> Column('id_anagrafica', Integer,
>>ForeignKeyConstraint('anagrafica.id'))
>>)
>>
>>thank you for any help.
>>j
>>
>>
>>
>>
>>
>>
>
>
>>
>
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---