Hi Herau,

Try this as a generic solution:

@Id
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "uuid")
@Column(name = "id", unique = true)
private String id;

I'm not so sure that OpenJPA supports custom generators out of the box, so I
will need to look into that.

You can still use Hibernate in TomEE, so no need to change your app if you
want to stick with Hibernate.

See the example here: http://openejb.apache.org/examples/jpa-hibernate/

Andy.




-----
    -- 
    Andy Gumbrecht

    http://www.tomitribe.com
    [email protected]
    https://twitter.com/AndyGeeDe

    TomEE treibt Tomitribe ! | http://tomee.apache.org
--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Hibernate-IdentifierGenerator-tp4670255p4670336.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to