Added missing JsonIdentityReferenceAnnotation

deploy_packages_to_gitea
Jens Pelzetter 2022-10-31 11:10:56 +01:00
parent 5c018eb9de
commit 576518ab63
1 changed files with 10 additions and 6 deletions

View File

@ -19,6 +19,7 @@
package org.librecms.contentsection; package org.librecms.contentsection;
import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIdentityReference;
import com.fasterxml.jackson.annotation.ObjectIdGenerators; import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import org.libreccm.categorization.Categorization; import org.libreccm.categorization.Categorization;
@ -316,11 +317,14 @@ public class Folder extends Category implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@OneToOne(fetch = FetchType.LAZY) @OneToOne(fetch = FetchType.LAZY)
@JoinTable(name = "FOLDER_CONTENT_SECTION_MAP", schema = DB_SCHEMA, @JoinTable(
inverseJoinColumns = { name = "FOLDER_CONTENT_SECTION_MAP", schema = DB_SCHEMA,
@JoinColumn(name = "CONTENT_SECTION_ID")}, inverseJoinColumns = {
joinColumns = { @JoinColumn(name = "CONTENT_SECTION_ID")},
@JoinColumn(name = "FOLDER_ID")}) joinColumns = {
@JoinColumn(name = "FOLDER_ID")}
)
@JsonIdentityReference(alwaysAsId = true)
private ContentSection section; private ContentSection section;
@Column(name = "TYPE", nullable = false) @Column(name = "TYPE", nullable = false)
@ -351,7 +355,7 @@ public class Folder extends Category implements Serializable {
protected void setObjects(final List<Categorization> objects) { protected void setObjects(final List<Categorization> objects) {
super.setObjects(objects); super.setObjects(objects);
} }
@Override @Override
protected void setSubCategories(final List<Category> subCategories) { protected void setSubCategories(final List<Category> subCategories) {
super.setSubCategories(subCategories); super.setSubCategories(subCategories);