Yeah! That's what I was looking for...and I didn't find. Actually I'm using a declarative model thru "declarative_base": every column in the table is an attribute in the class, so I have a column very similar to the one you wrote.
The problem was that I was looking for "generator" instead of "sequence" in the SA documentation. Thanks a lot. León On 4 ago, 16:49, "Werner F. Bruhin" <wbru...@gmail.com> wrote: > León wrote: > > Hi, > > > does anybody know how can I use the "default" param in the "Column" > > class to define a new value which comes from aFirebirdgenerator? I > > get the same thing with > > > cod_objeto = self.conexion.execute('SELECT FIRST 1 NEXT VALUE FOR GEN_ > > %d FROM RDB$DATABASE' % cod_clase).fetchone()[0] > > > *self.conexion = Session() > > > but I'd like something smarter. > > When defining your model (I use declarative) you can do this: > sa.Column(u'id', sa.Integer(), sa.Sequence('gen_i18n_keys_id'), > primary_key=True, nullable=False), > > Hope I understood your question correctly. > > Werner --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---