It's not a secret anymore!
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

[Hibernate] Problem with @TableGenerator

Daniel Suter

Joined: Jul 31, 2012
Posts: 2

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.


Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

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:
subject: [Hibernate] Problem with @TableGenerator
jQuery in Action, 3rd edition