This content has been marked as final. Show 2 replies
I think you might be jumping ahead here, as the exception states there is a problem with sequencing - not the ManyToOne relationship. First step would be to find out which entity has the issue with sequencing - is it OriginalWork or SubWork. You might try a simple test where both have a simple pk using sequencing. I don't think it is the Subwork entity, as per http://wiki.eclipse.org/EclipseLink/Examples/JPA/PrimaryKey generation mode auto should default to Table sequencing in EclipseLink - the error would be different.
Looking at the model, this should work as long as Subwork has either an embeddedId class or a PK class defined. Best bet since you are using a relationship mapping in the composite PK is to use a PK class with a long seq_number; and long originalwork; assuming OriginalWork's id is of type long as well.