Hi,
I don't know if we can have non-id column values being mapped to a sequence through Hibernate.
But, if the need is just to get that behaviour, you can try this.
( just a hack. unaware of pitfalls, if any )
public class MyModel { ... Integer id ; Integer dummy ; .... public Integer getDummy() { return id ; } }
and then map id to a sequnce. ( normal way )
--------------------------------------------------------------
Rate the reply if you find it helpful
Last edited by pramodkp on Fri Apr 20, 2007 12:03 am, edited 1 time in total.
|