dotsrc.org
http://mirrors.dotsrc.org/maven2
central
ggi-project.org
http://ftp.ggi-project.org/pub/packages/maven2
central
sunsite.dk
http://mirrors.sunsite.dk/maven2
central
planetmirror.com
http://public.planetmirror.com/pub/maven2
central
lsu.edu
http://ibiblio.lsu.edu/main/pub/packages/maven2
central
ibiblio.net
http://www.ibiblio.net/pub/packages/maven2
central
JPA annotation is like a subset of Hibernate annotation, this means people will find something available in Hibernate missing in JPA. One of the important missing features in JPA is customized ID generator. JPA doesn't provide an approach for developer to plug in their own IdGenerator. For example, if you want the primary key of a table to be BigInteger coming from sequence, JPA will be out of solution. Assume you don't mind the mixture of Hibernate and JPA Annotation and your JPA provider is Hibernate, which is mostly the case, a solution before JPA starts introducing new Annotation is, to replace JPA @SequenceGenerator with Hibernate @GenericGenerator. Now, let the code talk. /** * Ordinary JPA sequence. * If the Long is changed into BigInteger, * there will be runtime error complaining about the type of primary key */ @Id @Column(name = "id", precision = 12) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "XyzIdGenerator") @SequenceGe...
Comments