Nick Murphy wrote: > > Hi, > > A class of mine has no attributes besides its primary key. This key > is a surrogate, so I'd like to assign values automatically via > autoincrement. Unfortunately, it's not possible to persist objects of > this class to the database, as the SQL compiler complains about empty > inserts. Is there a common workaround for this?
empty inserts are supported at least by mysql, pg, oracle, and newer versions of SQLite (via INSERT...DEFAULT VALUES which SQLA invokes automatically). Its a database dependent issue so let us know what DB you're using. > > Thanks, > Nick > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---