openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From garpinc <>
Subject Attempt to set column xxx to two different values
Date Thu, 06 Sep 2012 00:26:46 GMT
I have a java class with 2 method names which are too long for db. To resolve
I put at @JoinColumn on the 2 getters with different names but i'm still
getting below exception. Can someone tell me to how to resolve?

        @JoinColumn(name = "ShowPerformanceAssignmentOccur1")
	public Collection<ShowPerformance>
getShowPerformanceAssignmentOccursOnThisPerformance() {

        @JoinColumn(name = "ShowPerformanceAssignmentOccur2")
	public Collection<ShowActPosition>
getShowPerformanceAssignmentOccursOnThisPosition() {

Caused by: <openjpa-2.2.0-r422266:1244990 fatal user error>
org.apache.openjpa.persistence.InvalidStateException: Attempt to set column
"ShowPerformanceAssignment.SHOWPERFORMANCEASSIGNMENTOCCUR" to two different
values: (class java.lang.Long)"835,839", (class java.lang.Long)"890,556"
This can occur when you fail to set both sides of a two-sided relation
between objects, or when you map different fields to the same column, but
you do not keep the values of these fields in synch.
	at org.apache.openjpa.jdbc.sql.PrimaryRow.setObject(
	at org.apache.openjpa.jdbc.sql.RowImpl.flushJoinValues(
	at org.apache.openjpa.jdbc.sql.RowImpl.flushForeignKey(

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message