Add missing @Cascade annotiation

deploy_packages_to_gitea
Jens Pelzetter 2022-12-06 19:14:27 +01:00
parent 22eb87f75b
commit 347f614c2d
1 changed files with 9 additions and 9 deletions

View File

@ -19,6 +19,8 @@
package org.librecms.assets; package org.librecms.assets;
import com.fasterxml.jackson.annotation.JsonIdentityReference; import com.fasterxml.jackson.annotation.JsonIdentityReference;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.envers.Audited; import org.hibernate.envers.Audited;
import java.io.Serializable; import java.io.Serializable;
@ -37,7 +39,7 @@ import static org.librecms.CmsConstants.*;
/** /**
* A contact entry for adding data to a {@link ContactableEntity}. * A contact entry for adding data to a {@link ContactableEntity}.
* *
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Entity @Entity
@ -64,6 +66,7 @@ public class ContactEntry implements Serializable {
// @Column(name = "ENTRY_KEY", length = 255, nullable = false) // @Column(name = "ENTRY_KEY", length = 255, nullable = false)
@OneToOne @OneToOne
@JoinColumn(name = "CONTACT_ENTRY_KEY_ID") @JoinColumn(name = "CONTACT_ENTRY_KEY_ID")
@Cascade(CascadeType.ALL)
@JsonIdentityReference(alwaysAsId = true) @JsonIdentityReference(alwaysAsId = true)
private ContactEntryKey key; private ContactEntryKey key;
@ -75,10 +78,10 @@ public class ContactEntry implements Serializable {
public ContactEntry() { public ContactEntry() {
super(); super();
order = 0; order = 0;
} }
public long getContactEntryId() { public long getContactEntryId() {
return contactEntryId; return contactEntryId;
} }
@ -102,14 +105,13 @@ public class ContactEntry implements Serializable {
// public void setKey(final String key) { // public void setKey(final String key) {
// this.key = key; // this.key = key;
// } // }
public ContactEntryKey getKey() { public ContactEntryKey getKey() {
return key; return key;
} }
public void setKey(final ContactEntryKey key) { public void setKey(final ContactEntryKey key) {
this.key = key; this.key = key;
} }
@ -121,8 +123,6 @@ public class ContactEntry implements Serializable {
this.value = value; this.value = value;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 7; int hash = 7;