Commit 2791bd60 authored by Maxym Borodenko's avatar Maxym Borodenko
Browse files

Updated AclSid class: serialize the identity of the SID

parent 9fa54965
...@@ -30,6 +30,7 @@ import javax.persistence.OneToMany; ...@@ -30,6 +30,7 @@ import javax.persistence.OneToMany;
import javax.persistence.Table; import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIdentityReference;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.ObjectIdGenerators; import com.fasterxml.jackson.annotation.ObjectIdGenerators;
...@@ -51,7 +52,7 @@ import org.hibernate.annotations.DiscriminatorOptions; ...@@ -51,7 +52,7 @@ import org.hibernate.annotations.DiscriminatorOptions;
@DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.INTEGER) @DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.INTEGER)
@DiscriminatorValue(value = "0") @DiscriminatorValue(value = "0")
@DiscriminatorOptions(force = false) @DiscriminatorOptions(force = false)
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id") @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "sid")
public class AclSid extends AuditedVersionedModel { public class AclSid extends AuditedVersionedModel {
/** The Constant serialVersionUID. */ /** The Constant serialVersionUID. */
...@@ -62,6 +63,7 @@ public class AclSid extends AuditedVersionedModel { ...@@ -62,6 +63,7 @@ public class AclSid extends AuditedVersionedModel {
private boolean principal; private boolean principal;
/** The sid. */ /** The sid. */
@JsonIdentityReference(alwaysAsId = true)
@Column(name = "sid", nullable = false, length = 100) @Column(name = "sid", nullable = false, length = 100)
private String sid; private String sid;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment