|
Dave Stephan, the mapping looks off (I think). In the test case, OutboundDistributorEligibility has the following:
@Id
@Column(name = "\"WETRN#\"", precision = 9, scale = 0)
private BigInteger transactionNumber;
...
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="\"WETRN#\"", insertable=false, updatable=false)
private OutboundNewDistributorTransaction transaction;
That would try to create 2 physical columns with the "WETRN#" name. It looks to me like they're trying to define a derived primary key from the many-to-one OutboundNewDistributorTransaction foreign key (ie, the OutboundDistributorEligibility PK is the same as its FK referring to to OutboundNewDistributorTransaction). Instead, try this:
Completely remove OutboundDistributorEligibility#transactionNumber. Add @Id to OutboundDistributorEligibility#transaction. OutboundDistributorEligibility.OutboundDistributorEligibilityPK will also need updated to refer to "transaction" instead of "transactionNumber".
Please give that a shot first. I'll leave this open for now.
|