tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agumbrecht <agumbre...@tomitribe.com>
Subject Re: Hibernate IdentifierGenerator
Date Sun, 06 Jul 2014 13:09:01 GMT
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
    agumbrecht@tomitribe.com
    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.

Mime
View raw message