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.