RE: How to specifiy Cascase None for OneToMany

2010-01-21 Thread Himadri
Thanks for your response and time ... Yeah I think for now I will go with the nullifying the columns at entity level . -- View this message in context: http://n2.nabble.com/How-to-specifiy-Cascase-None-for-OneToMany-tp4426059p4438679.html Sent from the OpenJPA Users mailing list archive at

RE: How to specifiy Cascase None for OneToMany

2010-01-21 Thread Ravi Palacherla
ubject: Re: How to specifiy Cascase None for OneToMany Hi, Hmm... It worked for me on a standalone openJPA testcase against derby DB. As you are running on WLS and against oracle DB, I created a testcase with similar environment. http://n2.nabble.com/file/n4432179/EJBTestCase.zip EJBTestCase.zi

Re: How to specifiy Cascase None for OneToMany

2010-01-20 Thread Ravi P Palacherla
Hi, Hmm... It worked for me on a standalone openJPA testcase against derby DB. As you are running on WLS and against oracle DB, I created a testcase with similar environment. http://n2.nabble.com/file/n4432179/EJBTestCase.zip EJBTestCase.zip Please download the attached zip file. Modify build

Re: How to specifiy Cascase None for OneToMany

2010-01-20 Thread Himadri
Nope .. it didnt work. Does this need some property in persistence.xml also ? My new entity looks like this now CampaignTarger.class @ManyToOne(targetEntity=Campaign.class, fetch = FetchType.LAZY ) @JoinColumn(name = "campaign_Ref" ,nullable=true) @ForeignKey(deleteAction=ForeignKeyAction.NULL)

Re: How to specifiy Cascase None for OneToMany

2010-01-20 Thread Ravi P Palacherla
Hi Himadri, Can you try to set deleteAction=ForeignKeyAction.NULL on the foreignkey which will nullify the local column when the parent row is deleted. @Entity public class EntityA { ... @ManyToOne(targetEntity=EntityB.class,fetch=FetchType.LAZY) @JoinColumn(name="EntityBId", nullable=t