on-internet
← Community

Where to set hibernate.id.new_generator_mappings property?

Stack Overflow ·

I've wasted too much time on this ... I'm using oracle and I have a sequence (MY_TABLE_SEQ) defined which increments by 1. In my Pojo I have: @SequenceGenerator(name = "MY_SEQ", sequenceName="MY_TABLE_SEQ", allocationSize=50) @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="MY_SEQ") This gives me a unique constraint issue. From my understanding I need to set the following property: hibernate.id.new_generator_mappings=true I've tried setting in my hibernate.cfg.xml file but it does not seem to make any difference. I've come across server post to place in persistance.xml but this is

Comments

Sign in or sign up to comment and upvote.

No comments yet.