aspose file tools*
The moose likes Object Relational Mapping and the fly likes [Hibernate] Problem with @TableGenerator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[Hibernate] Problem with @TableGenerator" Watch "[Hibernate] Problem with @TableGenerator" New topic
Author

[Hibernate] Problem with @TableGenerator

Daniel Suter
Greenhorn

Joined: Jul 31, 2012
Posts: 2
Hi,

I tried to the TableGenerator annotation from hibernate to generate ids. However it does not seem to work.

My entity:


Hibernate will not create the table "custom_sequences", when creating the schema. It simply sets the id column to auto_increment.

perisistence.xml



Testcode:
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1649
    
    7

make sure all of your imports are coming out of javax.persistence.

also change to


See if that makes a difference for you.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Hibernate] Problem with @TableGenerator