Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hi
Is it possible to use a specific class for PK-sequence-generation with annotations.
hbm.xml mapping:
Code:
...
<id name="id" type="java.lang.Long" column="foo_id"
unsaved-value="-100" access="field">
<generator class="org.test.SequenceGenerator">
<param name="sequence">db.seq</param>
</generator>
</id>
...
with annotations [id - getter]
Code:
@Id
@SequenceGenerator(name="SEQ_GEN", sequenceName="org.test.SequenceGenerator)
public Long getId() {
return this.id;
}
or is it just possible with the sequence object in the database?
greez