Hi,
I'm using the hbm2hbmxml and then hbm2java from hibernate tools to generate my pojos from a database. Here's the version info:
Hibernate tools: 3.2.0 beta6a
Database: postgresql 8.1.4-1PGDG
JDBC: postgresql 8.1-406 jdbc3
So everything works great except I don't get the @GeneratedValue annotation I expected.
On my database, I created sequence generators. But when I ran the ant task, my mapping files have a generator class="assigned" instead of sequence. And my pojo doesn't have the GeneratedValue annotation.
Is there a configuration I need to setup for the right generator class to be put into the mapping files? I'm assuming once the mapping files have the right one, the pojos will have the annotation too.
I know I can use the reveng.xml and specify the generator class for each table but I want to avoid having to do that.
Thanks
Budyanto
|