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 a Firebird generator? 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to