Closed mkai closed 10 years ago
Are you using sequences in a right way? Looking at SA documentation http://docs.sqlalchemy.org/en/rel_0_9/dialects/oracle.html, I only see sequences used as positional column parameters:
t = Table('mytable', metadata,
Column('id', Integer, Sequence('id_seq'), primary_key=True),
autoload=True
)
You're right, I made a mistake specifying the Sequence using the default
keyword argument. If I specify it positionally, however:
id = Column(Integer, Sequence('id_seq'), primary_key=True)
... the AttributeError still occurs.
Hi, thanks for the library! I just started integrating it and had the above error with the Oracle dialect after passing in a
Sequence
object fordefault
.However, I need to pass in a sequence to simulate an auto-incrementing ID:
This fix solves the problem by explicity checking if
column.default
is aColumnDefault
instance.What do you think?