Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Hibernate ID Migration

I would recommend you migrate this generator to a SEQUENCE or TABLE generated
Id (and use a pre-allocation size).

EclipseLink (and JPA) do not have a UUID generator, you could implement your
own through subclassing the Sequence class
(org.eclipse.persistence.sequencing) (and perhaps contribute it to
EclipseLink), but I would recommend you use one of the standard id
generators.


Frans Thamura-2 wrote:
> 
> hi there
> 
> I try to migrate my opensource project, called cimande.
> http://www.sf.net/projects/cimande, located in /branch/cimande-jpa
> 
> i have problem with this, and is there a syntax for this syntax
> replacement
> 
>     /**
>      * @return Returns the id.
>      * @hibernate.id generator-class="uuid.hex" length="28"
> unsaved-value="0"
>      */
>     @Id() @GeneratedValue(generator="system-uuid")
>     @GenericGenerator(name="system-uuid", strategy = "uuid")
>     public String getId() {
>         return id;
>     }
> 
> 
> the source is from org.blueoxygen.cimande.DefaultPersistance
> 
> F
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/Hibernate-ID-Migration-tp17187362p17207803.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top