-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: problem on delete beacuse of mapped view as collection
PostPosted: Wed Jun 10, 2009 2:24 pm 
Newbie

Joined: Mon May 18, 2009 12:00 pm
Posts: 17
I have an entity , I mapped a view as a collection to this entity .Now when I call delete for this entity hibernate first tries to delete from view and I get this error

ORA-01752: cannot delete from view without exactly one key-preserved table

I am wondering If I can tell hibernate not to issue delete statement for this view ?

here my entity

Code:
   @OneToMany()
   @JoinTable(
      name="PROG_GRANT_FINDINGS",
      joinColumns = { @JoinColumn( name="SYS_AUDIT_PROG_GRANT_ID", insertable=false, updatable=false) },
      inverseJoinColumns = @JoinColumn( name="SYS_FINDING_ID", insertable=false, updatable=false)
   )
   public List<StgFinding> getStgFindings() {
      return stgFindings;
   }
   
   private void setStgFindings(List<StgFinding> stgFindings) {
      this.stgFindings = stgFindings;
   }


PROG_GRANT_FINDINGS is a view please suggest how to handle this ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.