Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Constraint violation with @OrderColumn
Constraint violation with @OrderColumn [message #1752859] Sun, 29 January 2017 19:04 Go to next message
Marc Dzaebel is currently offline Marc DzaebelFriend
Messages: 10
Registered: July 2009
Junior Member
I get a violation of a primary key constraint of the join table, that is automatically created by EclipseLink for the following classes:
@Entity public class Link {
    @ManyToMany @OrderColumn
    private List<Node> nodes; ...

@Entity public class Node {
    @ManyToMany(fetch = FetchType.EAGER, mappedBy = "nodes") 
    private List<Link> links; ...

The violation occurrs, if I insert a Link with the same Node on first and second position of it's nodes. Indeed there is a generated index with NODES_ID and LINKS_ID (missing NODES_ORDER). How could I influence EclipseLink in order to ommit or extend this constraint?

Using: Glassfish 4.1.1, EclipseLink 2.6.4 or 2.7.0, Java 8
Re: Constraint violation with @OrderColumn [message #1752937 is a reply to message #1752859] Mon, 30 January 2017 23:17 Go to previous message
Marc Dzaebel is currently offline Marc DzaebelFriend
Messages: 10
Registered: July 2009
Junior Member
Seems to be an EclipseLink bug since 2008

https://bugs.eclipse.org/bugs/show_bug.cgi?id=256978
Previous Topic:Problems with aggregate collection mappings
Next Topic:Error unmarshaling xml with MTOM attachment
Goto Forum:
  


Current Time: Tue Nov 21 02:56:11 GMT 2017

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

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