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
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply 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: 1282

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: [Hibernate] Problem with @TableGenerator
 
Similar Threads
EJB3 Beta Certification - EntityManager BASIC notes. (PART II)
Map multiple properties as @Id properties Problem
Query on various properties wrt auto table generator
org.hibernate.exception.GenericJDBCException
Identity issue for EJB3.0 Entity along with Hibernate HBM configuration