I have two Tables CUSTOMER and CUSTOMER_EXT (mapped as Secondary)

@[EMAIL PROTECTED](name = "CUSTOMER")
@SecondaryTable(name = "CUSTOMER_EXT", pkJoinColumns =
@PrimaryKeyJoinColumn(name = "CUST_ID", referencedColumnName = "CUST_ID"))

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

I am trying to embed this class and persist in the Secondary Table. 

//Customer.class embeds DateRange.class
@Embedded
@AttributeOverrides( {
@AttributeOverride(name = "from", column = @Column(name = "FROM_DT", table =
"CUSTOMER_EXT")),
@AttributeOverride(name = "to", column = @Column(name = "TO_DT", table =
"CUSTOMER_EXT"))} )
private DateRange dr;

When I do this it tries to insert into a column named DATERANGE_CUST_ID in
CUSTOMER_EXT which obviously is not there.
Any Clues? 
-- 
View this message in context: 
http://n2.nabble.com/Embed-on-Secondary-Table-tp782270p782270.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to