Using a HexString as Id

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown Using a HexString as Id

by Alexander Malic-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hello

With Hibernate I was able to use a 32 character Hex-String as Id for my Entities. ( http://www.roseindia.net/hibernate/hibernateidgeneratorelement.shtml ),

How can this be done with Eclipse-Link?

regards and thanks in advance,
alexander malic

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Using a HexString as Id

by James Sutherland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You can add your own custom sequence generator in EclipseLink through creating your own Sequence (org.eclipse.persistence.sequencing) subclass and adding it to your Session's DatabaseLogin using a SessionCustomizer.

You could also assign your id using a prePersist event, or directly from your application.


Alexander Malic-2 wrote:
hello

With Hibernate I was able to use a 32 character Hex-String as Id for my
Entities. (
http://www.roseindia.net/hibernate/hibernateidgeneratorelement.shtml ),

How can this be done with Eclipse-Link?

regards and thanks in advance,
alexander malic

Re: Using a HexString as Id

by Alexander Malic-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

so there is no uid-generator included with eclipselink. shouldn't be too hard to write one on my own.

thanks for the help.

kind regards

2008/9/2 James Sutherland <jamesssss@...>

You can add your own custom sequence generator in EclipseLink through
creating your own Sequence (org.eclipse.persistence.sequencing) subclass and
adding it to your Session's DatabaseLogin using a SessionCustomizer.

You could also assign your id using a prePersist event, or directly from
your application.



Alexander Malic-2 wrote:
>
> hello
>
> With Hibernate I was able to use a 32 character Hex-String as Id for my
> Entities. (
> http://www.roseindia.net/hibernate/hibernateidgeneratorelement.shtml ),
>
> How can this be done with Eclipse-Link?
>
> regards and thanks in advance,
> alexander malic
>


-----
---
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/Using-a-HexString-as-Id-tp19224658p19271409.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



--
lg, alex

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users