Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Is @PrimaryKeyJoinColumn(...) the same as...?
Is @PrimaryKeyJoinColumn(...) the same as...? [message #639749] Wed, 17 November 2010 16:28 Go to next message
Karsten Wutzke is currently offline Karsten WutzkeFriend
Messages: 112
Registered: July 2009
Senior Member
Hello,

using @PrimaryKeyJoinColumn, which doesn't have the insertable and updatable parameters:

Is @PrimaryKeyJoinColumn interchangable with

@JoinColumn(..., insertable = false, insertable = false)

or

@JoinColumn(..., insertable = true, insertable = true)

?

What are the insertable and updatable properties set to? Are they set to anything at all?

Are they interchangable at all? I'm getting rather inconsistent mapping exception with EclipseLink and Hibernate. Is @PrimaryKeyJoinColumn reserved for inheritance and secondary tables?

Karsten
Re: Is @PrimaryKeyJoinColumn(...) the same as...? [message #639982 is a reply to message #639749] Thu, 18 November 2010 15:35 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Yes.

James : Wiki : Book : Blog : Twitter
Re: Is @PrimaryKeyJoinColumn(...) the same as...? [message #640055 is a reply to message #639982] Thu, 18 November 2010 20:22 Go to previous messageGo to next message
Karsten Wutzke is currently offline Karsten WutzkeFriend
Messages: 112
Registered: July 2009
Senior Member
James wrote on Thu, 18 November 2010 10:35
Yes.


Equivalent to the first one. Also see

http://stackoverflow.com/questions/4205628/jpa-is-primarykey joincolumn-the-same-as-joincolumn-insertable-u

EclipseLink has problems with exchanging @PrimaryKeyJoinColumn(...) and @JoinColumn(..., insertable = false, updatable = false). I'll post a link to a bug report and a standalone JavaSE, HSQLDB, Ant example soon.

James, thanks again for helping on this.

Thanks
Karsten
Re: Is @PrimaryKeyJoinColumn(...) the same as...? [message #640089 is a reply to message #640055] Fri, 19 November 2010 03:23 Go to previous message
Karsten Wutzke is currently offline Karsten WutzkeFriend
Messages: 112
Registered: July 2009
Senior Member
Bug filed under:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=330628

Karsten
Previous Topic:Null Property persisted with value Zero
Next Topic:Problems executing a Stored Procedure
Goto Forum:
  


Current Time: Thu Nov 27 10:01:29 GMT 2014

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

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