Hello,

I wanted to use a custom type as an auto-increment / primary key in
one of my
tables.  The type is made like this:

class BoxId (sqlalchemy.types.TypeDecorator):
      impl = sqlalchemy.types.Integer

Using it in a table like this:

box = Table ('box', metadata,
             Column ('id', BoxId, primary_key=True),
             Column ('catalog', Unicode(64)),
          )

But having the table defined like that raises an exception when trying
to insert
 values. I'm using postgres and it looks like
sqlalchemy.databases.postgres.PGDefaultRunner.get_column_default ()
deals
with auto-increments and is specifically looking for an
sqlalchemy.types.Integer.
I expected sqlalchemy would treat a type created the way I did above
more or less
like an integer, because of the impl attribute.

Is this a bug in either sqlalchemy or specifically the postgres part?
Or is this just
not supposed to work like this?  (I'm fairly new to sqlalchemy :)

Thank you for any help you can give me.

-- Kuno.

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