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

Updated AclSid class: serialize the identity of the SID

parent 9fa54965
......@@ -30,6 +30,7 @@ import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIdentityReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
......@@ -51,7 +52,7 @@ import org.hibernate.annotations.DiscriminatorOptions;
@DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.INTEGER)
@DiscriminatorValue(value = "0")
@DiscriminatorOptions(force = false)
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id")
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "sid")
public class AclSid extends AuditedVersionedModel {
/** The Constant serialVersionUID. */
......@@ -62,6 +63,7 @@ public class AclSid extends AuditedVersionedModel {
private boolean principal;
/** The sid. */
@JsonIdentityReference(alwaysAsId = true)
@Column(name = "sid", nullable = false, length = 100)
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