Commit 35d46216 authored by Matija Obreza's avatar Matija Obreza

ES: Store UUID field

parent e27ee1fc
...@@ -22,6 +22,9 @@ import javax.persistence.MappedSuperclass; ...@@ -22,6 +22,9 @@ import javax.persistence.MappedSuperclass;
import javax.persistence.PrePersist; import javax.persistence.PrePersist;
import org.hibernate.annotations.Type; import org.hibernate.annotations.Type;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldIndex;
import org.springframework.data.elasticsearch.annotations.FieldType;
import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators; import com.fasterxml.jackson.annotation.ObjectIdGenerators;
...@@ -39,6 +42,7 @@ public abstract class UuidModel extends AuditedVersionedModel implements IdUUID ...@@ -39,6 +42,7 @@ public abstract class UuidModel extends AuditedVersionedModel implements IdUUID
/** The uuid. */ /** The uuid. */
@Column(unique = true, updatable = false, nullable = false) @Column(unique = true, updatable = false, nullable = false)
@Type(type = "uuid-binary") @Type(type = "uuid-binary")
@Field(type = FieldType.String, store = false, index = FieldIndex.not_analyzed)
protected UUID uuid; protected UUID uuid;
/** /**
......
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