-->
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.  [ 2 posts ] 
Author Message
 Post subject: Avoid updating for list of primitives
PostPosted: Wed Aug 12, 2009 12:32 pm 
Beginner
Beginner

Joined: Wed Jan 16, 2008 8:16 am
Posts: 23
Hi,

I'm using following code snippet:

Code:
    @CollectionOfElements(targetElement = String.class)
    @JoinTable(name = "VIEW",
        joinColumns = @JoinColumn(name = "ID"))
    @Column(name = "COLUMN")
    private Set<String> columns;


The code works fine until I want to execute a delete on this object.
On deletion a cascading delete of the entry in the referenced view
is triggered. Unfortunately it is a view, so I cannot delete any entry.

How can I turn off any cascading for such a property.

I'm using hibernate 3.2.6ga.

Thx in advance,
Michi


Top
 Profile  
 
 Post subject: Re: Avoid updating for list of primitives
PostPosted: Thu Aug 13, 2009 2:41 am 
Beginner
Beginner

Joined: Wed Jan 16, 2008 8:16 am
Posts: 23
Hi,

I used a instead of delete trigger in oracle. No nice solution, but
it works. Maybe someone can help me with a full hibernate solution.

Code:
create or replace trigger THE_VIEW_TRIGGER
instead of delete on THE_VIEW
DECLARE
BEGIN
  null;
END;


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

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.