Nice one, thats been on my list of things to do for a while :)
A couple of things i've spotted that you might be interested in..
- Handle SERIAL fields and "get-sequence-pre-insert" type fields differently. I did investigate this briefly but would require being able to determine which field type was being used when generating the value.
- Small bug in the "FOR UPDATE" string - the default is not supported by postgres. you need to remove the "OF *" bit.
Not sure if it includes specific toplink info, but there is a howto for the entire source tree - you may be able to build a particular part
[Message sent by forum member 'jsl123' (jsl123)]
http://forums.java.net/jive/thread.jspa?messageID=225002