I've got a table which has an ID column which is generated with "increment". (native doesn't work)
This table also has a boardroomID column. This ID represents a boardroom. The thing is, there can be duplicate boardroomID's. If a modification is made to a boardroom, a new row is added (new ID), but with the same boardroomID so we know it's the same one, and can sort by the time stamps.
So basically when I create a new one, it should have either a new boardroom ID, or it can be set to an existing one.
How can I do this with Hibernate? Is it bad practice to use my datasource directly? I could just copy the method from my old POJO's which had the persistance written by me in straight SQL....
Thanks,
Greg
|