openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atilla <crag...@yahoo.com>
Subject Re: Embed on Secondary Table
Date Tue, 26 Aug 2008 07:30:30 GMT

worked like a charm. thank you.

here is my test model:
@Entity
@Table(name = "CUSTOMER")
@DiscriminatorColumn(name = "CUSTOMER_CLASS")
@SecondaryTable(name = "CUSTOMER_EXT", pkJoinColumns =
@PrimaryKeyJoinColumn(name = "CUST_ID", referencedColumnName = "CUST_ID"))
@Inheritance(strategy = InheritanceType.JOINED)
public class Customer {
...
@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;
...
}

@Entity
@DiscriminatorValue("ORG")
@Table(name="ORGANIZATION")
@PrimaryKeyJoinColumn(name="CUST_ID", referencedColumnName="CUST_ID")
public class Organization extends Customer {...}



Pinaki Poddar wrote:
> 
> Hi,
>   If you can update OpenJPA from trunk and verify whether the fix works
> for you or not, please let us know.
> 
> 
> 

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


Mime
View raw message