Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » zero as a primary key
zero as a primary key [message #1177116] Fri, 08 November 2013 14:45 Go to next message
Eclipse UserFriend
Is there a way to set eclipselink.allow-zero-id using the "TopLink legacy" eclipseLink configuration and API?
We're migrating from TopLink to EclipseLink for many of our legacy applications.
We do NOT intend to switch them to JPA.
TopLink allowed zero for a primary key and EclipseLink is throwing an exception.
We've found solutions for JPA, but would like to apply this property in a non-JPA context.

Thanks

[Updated on: Fri, 08 November 2013 16:17] by Moderator

Re: zero as a primary key [message #1181290 is a reply to message #1177116] Mon, 11 November 2013 09:02 Go to previous message
Eclipse UserFriend
The eclipselink.allow-zero-id property is equivalent to the static org.eclipse.persistence.internal.helper.Helper.isZeroValidPrimaryKey boolean, which you could set in a session event method or customizer. This property was deprecated though in favor of using "eclipselink.id-validation" which you would call session.getProject().setDefaultIdValidation(IdValidation.NULL) in a customizer/event to use.

Best Regards,
Chris
Previous Topic:Customize JPA field name mapping using EclipseLink
Next Topic:JavaDbGenerator error on Luna Release
Goto Forum:
  


Current Time: Fri Jul 04 11:14:33 EDT 2025

Powered by FUDForum. Page generated in 0.05515 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top