Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

How to update Many-to-one relationship ?

himadri

2010-03-04

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi,

I have requirement to update Many-to-one relationship ,

For instance , Books belong to one author >> Book (*- 1) Author1

I need to update Book1 to point to another Author1.
I have tried using em.merge(Book) with CascadeType.MERGE but it doesnt work.
It should work.

There is no exception generated , but the data is also not updated in
database.

Can anyone explain me how to update Book1 to point to another Author.

Thanks in advance

-H



--
Sent from the OpenJPA Users mailing list archive at Nabble.com.
©2008 gg3721.com - Jax Systems, LLC, U.S.A.