Hi there,
I've a table which is use to store protocols. Every entry represents a user action. An entry has an ID and a "changeID". This changeID groups several protocol entries to one change. This is done because one user action can result in multiple protocol entries. Now I wonder how I can tell Hibernate to use this sequence in the way I want. Every user action produces multiple protocol entries which are persisted in one transaction. If I now use the sequence the way I would for a primary key, this would produce a different changeID for every protocol entry. But I want them to have the same changeID. I tried to manually get the next value from the sequence with a "select x.nextval from dual" query, but then Hibernate tells me that "dual" isn't mapped.
What would you do?
Thanks in advance Jens
|