-->
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 with joined subclass
PostPosted: Mon Jul 13, 2009 8:30 pm 
Newbie

Joined: Mon Jul 13, 2009 8:06 pm
Posts: 1
Hi everyOne,

I have googled for some hours without findig any answer if someone could point me in the right direction will be appreciated.

I have the following:
Code:
@Entity
@Table(name = "persona", catalog = "sime")
@Inheritance(strategy=InheritanceType.JOINED)
@SuppressWarnings("serial")
public class Persona implements Serializable {
   
   
   /**
    * Constructor
    */
   public Persona() {
      
   }

   /**
    * <p>
    * </p>
    * @return idPersona
    */
   @Basic
   @Id
   @GeneratedValue
   @Column(name = "id_persona")   
   public Integer getIdPersona() {
      return idPersona;
   }
.
.
.


@Entity
@Table(name = "paciente", catalog = "sime")
[b]@OnDelete(action=OnDeleteAction.NO_ACTION)[/b]
@SuppressWarnings("serial")
public class [b]Paciente [/b]extends [b]Persona [/b]implements Serializable, IAuditable {
   
   /**
    * Constructor
    */
   public Paciente() {
   
   }
   .
       .
       .   
   


My problem is that if I delete a Paciente the Persona gets deleted too, I've added @onDelete annotation without any success.

Any help would be appreciated.

Thanks.


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.