Java hibernate and Postgresql
Table:
CREATE TABLE players
(
id serial NOT NULL,
....
)
HBM:
<class name="Player" table="players">
<id name="id" column="id">
<generator class="identity" />
</id>
...
I want to be able to insert a specific ID in some cases as I'm importing data from another data source and need to maintain ID consistency.
When inserting with hibernate even when I set the ID of the object it still inserts without using the ID that I've specified.
Are there settings that I can change to support specifying the ID on insert?