-->
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: ManyToMany using a View as the JoinTable
PostPosted: Mon Oct 13, 2008 4:56 pm 
Newbie

Joined: Mon Oct 13, 2008 3:57 pm
Posts: 1
Hibernate version: 3.2.1

Name and version of the database you are using: Oracle 10g


Hi guys, this is my first time posting here so thanks in advance for any help...

We've got an unusual ManyToMany relationship with a view as the JoinTable. We still need to perform deletes but can't have hibernate auto-deleting from the JoinTable (which bombs because it's a view). Here is a simplified version of our mapping:

Code:
@ManyToMany(targetEntity = Foo.class)
@JoinTable(name = "COMPLEX_VIEW",
   joinColumns = {
      @JoinColumn(name = "FID",referencedColumnName="FID") },
   inverseJoinColumns = {
      @JoinColumn(name = "ZID",referencedColumnName="ZID")
   })
@OnDelete(action=OnDeleteAction.NO_ACTION)
private Set<Foo> foos = new HashSet<Foo>();


We tried using the OnDelete=No_Action annotation but it appears to be bugged (http://opensource.atlassian.com/projects/hibernate/browse/ANN-30).

Does anyone have any ideas how we could work around this problem?

Thanks,

Mark.


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.