05 February 2009

Things I will forget [001]

This is for manually inserting a record into a postreSQL database that has been generated by hibernate (JPA).

use '\ds' to sanity check the sequence name ("hibernate_sequence")

In the insert statement's values section, use 'nextval('hibernate_sequence')' as the ids value, like:

insert into tablename (id, name) values(nextval('hibernate_sequence'), 'bob')

<<Blog as memory>>

No comments: