Hi,
> I have COLUMNS FROM_DT, TO_DT in CUSTOMER_EXT and I am using a class
> DateRange which maps 
> those columns.

Secondary table CUSTOMER_EXT need to have a join column CUST_ID to refer to
primary key column of CUSTOMER.CUST_ID. However, your observation does point
to a error in OpenJPA as it generates 
a column named DATERANGE_CUST_ID instead of CUST_ID as specified in
@SecondaryTable(pkJoinColumns=...).

The problem is logged as JIRA report  OPENJPA-705.

Currently you can perhaps workaround as 
@SecondaryTable(name = "CUSTOMER_EXT", pkJoinColumns =
@PrimaryKeyJoinColumn(name = "DATERANGE_CUST_ID", referencedColumnName =
"CUST_ID"))


[1] https://issues.apache.org/jira/browse/OPENJPA-705

-- 
View this message in context: 
http://n2.nabble.com/Embed-on-Secondary-Table-tp782286p782706.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to