Default value based on sequence

I’m trying to set a default value based on a sequence, and having trouble.  In this case the ‘serial’ datatype isn’t going to work.  

When I use defaultValue the apostrophes are escaped, and Postgres complains:


When I use defaultNumericValue I get Unparseable number: “nextval(‘my_id_seq’”.  Is there a workaround here besides raw SQL?


In 1.9 there isn’t a way besides raw SQL.  2.0 introduces a new “defaultValueComputed” attribute that will work.


Ok, thanks Nathan.