Commit c08fd432 authored by Matija Obreza's avatar Matija Obreza

@Lob with Hibernate type

parent dac310f1
......@@ -26,6 +26,7 @@ import javax.persistence.Table;
import javax.persistence.Version;
import org.genesys2.server.model.BusinessModel;
import org.hibernate.annotations.Type;
/**
* Accession "alias"
......@@ -43,6 +44,7 @@ public class AccessionRemark extends BusinessModel implements AccessionRelated {
@Lob
@Column(name = "remark")
@Type(type = "org.hibernate.type.TextType")
private String remark;
@Column(length = 30)
......
......@@ -58,6 +58,7 @@ public class Method extends GlobalVersionedAuditedModel implements AclAwareModel
private String method;
@Lob
@Type(type = "org.hibernate.type.TextType")
private String i18n;
@Transient
......
......@@ -49,7 +49,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@Cacheable
@Entity
@Table(name = "user")
@Table(name = "\"user\"")
@JsonSerialize(using = UserSerializer.class)
public class User extends BusinessModel {
......
......@@ -23,6 +23,7 @@ import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import org.genesys2.server.model.VersionedAuditedModel;
import org.hibernate.annotations.Type;
@Entity
@Table(name = "kpiparameter", uniqueConstraints = { @UniqueConstraint(name = "UQ_kpiparameter_name", columnNames = { "name" }) })
......@@ -41,6 +42,7 @@ public class KPIParameter extends VersionedAuditedModel {
private String condition;
@Lob
@Type(type = "org.hibernate.type.TextType")
private String description;
public String getName() {
......
......@@ -36,6 +36,7 @@ import javax.persistence.Transient;
import org.apache.commons.lang.StringUtils;
import org.genesys2.server.model.AclAwareModel;
import org.genesys2.server.model.VersionedAuditedModel;
import org.hibernate.annotations.Type;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.oauth2.provider.ClientDetails;
......@@ -50,6 +51,7 @@ public class OAuthClientDetails extends VersionedAuditedModel implements ClientD
@Lob
@Column
@Type(type = "org.hibernate.type.TextType")
private String description;
@Column(unique = true, nullable = false)
......
......@@ -42,6 +42,7 @@ public class OAuthCode extends BusinessModel {
@Lob
@Column(name = "authentication")
//@Type(type = "org.hibernate.type.TextType")
private byte[] authentication;
@Temporal(TemporalType.TIMESTAMP)
......
......@@ -464,9 +464,9 @@ public class DirectMysqlQuery {
if (LOG.isDebugEnabled()) {
LOG.debug("Pageable=" + pageable.getOffset() + " " + pageable.getPageNumber());
}
sortBuffer.append(pageable.getOffset());
sortBuffer.append(", ");
sortBuffer.append(pageable.getPageSize());
sortBuffer.append(" offset ");
sortBuffer.append(pageable.getOffset());
if (LOG.isDebugEnabled()) {
LOG.debug("Filter query:\n" + sb.toString());
......
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