Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

Re: OpenJPA - two-sided relation between objects Issue

Madhu Kalaimalai

2008-08-14

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi Pinaki

Can you pl let me know, how to get the changes in my jars ?

Do I need to take the changed files and build the jars ?

Further will this work even in case of birectional relationship what i mean
is if i have address attribute in phone with addr_fk_id as the column and
also column mapping for addr_fk_id. When I tried this it had two columns in
the insert statement and said duplicate columns.

Rgds
Madhu


Pinaki Poddar wrote:
>
> Hi,
>  Recent SVN commit 686037 includes a change that allows usage of
> @ForeignKey(implicit=true) on a @Basic field that holds a primitive value
> but implies a relation to a persistent entity.
>
> So you can do something like this in Phone.java
>
>  @Basic
>  @Column(name="ADDR_FK_ID",nullable=true)
>  @ForeignKey(implicit=true)
>  private Long addressId;
>
>
> Note that @ForeignKey(implicit=true) prohibits setting any other property
> on that annotation.
>
> If you have access to SVN repository you can also see a set of JUnit Test
> Cases to demonstrate and verify its usage.
>

--
Sent from the OpenJPA Users mailing list archive at Nabble.com.

©2008 gg3721.com - Jax Systems, LLC, U.S.A.