I have been developing using SQLite at the backend for development
purposes and am now switching to Oracle.

Unfortunately the foreign key constraint names generated by Elixir/
SQLAlchemy exceed the 30 char limit on identifier name in Oracle. (I
have already sorted the table & intermediate table names out with
their relevant options)

I read that "constraint_kwargs" is a dictionary which can be passed in
the column definition and the source suggests that the constraint name
should be specified as "name" within this dict.

However when I specify the constraint_kwargs={"name":
"UplFile_DocId_FK"} in the column declaration (example DSL pasted
below) , I get an error on generating the schema:

 <<  TypeError: _FigureVisitName object got multiple values for
keyword argument 'name' >>

What is the correct means of specifying the name of a foreign key?

########################################################################
class UploadedFile(Entity):
    """ A file uploaded representing the rendering of a document"""

    # fields
--------------------------------------------------------------
    has_field('id', Integer, primary_key=True)
    has_field('filename', Unicode(100), nullable=False)
    has_field('abspath', Unicode(2000), nullable=False)
    has_field('size', Integer)

    # relationships
----------------------------------------------------
    belongs_to('document', of_kind='Document',
constraint_kwargs={"name": "UplFile_DocId_FK"})
    using_options(tablename='UploadedFile')

Thanks for any help,

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

Reply via email to