开发者

How to define jpa Application level generators

As I am using using mysql database and I am using id strategy.

@GeneratedValue(strategy = GenerationType.TABLE

and I found that using jpa xml can define a application level generator f开发者_如何学Gorom the below link

http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.2/doc/hibernate/Annotations_Reference_Guide/Overriding_metadata_through_XML.html

I have tried but failed. Did anyone use this method?


DataNucleus docs define exactly what the JPA spec also defines for XML metadata, as per http://www.datanucleus.org/products/accessplatform_2_0/jpa/metadata_xml.html and you can define a value generator for a field/property. When done like that it works (with DataNucleus). You don't mention what JPA impl you're using

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜