Commit e0d3ddb0 authored by Matija Obreza's avatar Matija Obreza

Merge branch 'ui-366-update-aclsid-class' into 'master'

Updated AclSid class: serialize the identity of the SID

See merge request genesys-pgr/application-blocks!35
parents 9fa54965 b38eb766
......@@ -21,10 +21,14 @@ import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.PrePersist;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
/**
* The Class UuidEntity.
*/
@MappedSuperclass
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "uuid")
public abstract class UuidModel extends AuditedVersionedModel implements IdUUID {
/** The Constant serialVersionUID. */
......
......@@ -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