These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: @GeneratedValue
PostPosted: Sat Aug 19, 2006 6:46 pm 
Senior
Senior

Joined: Sat Aug 19, 2006 6:31 pm
Posts: 139
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.