Commit 5d0ada75 authored by Matija Obreza's avatar Matija Obreza
Browse files

Updates for Postgres

- ID generation using AUTO
- @Type for @Lob columns
parent 4a5aa9f0
......@@ -31,6 +31,7 @@ import javax.persistence.OrderColumn;
import org.genesys.blocks.model.AuditedVersionedModel;
import org.genesys.blocks.model.Copyable;
import org.genesys.blocks.security.model.AclAwareModel;
import org.hibernate.annotations.Type;
/**
* {@link ImageGallery} is a collection of ordered {@link RepositoryImage}
......@@ -66,6 +67,7 @@ public class ImageGallery extends AuditedVersionedModel implements AclAwareModel
* Gallery description in English.
*/
@Lob
@Type(type = "org.hibernate.type.TextType")
private String description;
/** The images. */
......
......@@ -24,6 +24,7 @@ import javax.persistence.Table;
import org.genesys.filerepository.metadata.DocumentMetadata;
import org.genesys.filerepository.metadata.ImageMetadata;
import org.hibernate.annotations.Type;
// TODO: Auto-generated Javadoc
/**
......@@ -47,6 +48,7 @@ public class RepositoryDocument extends RepositoryFile implements DocumentMetada
/** The abstrct. */
@Column(name = "abstract")
@Lob
@Type(type = "org.hibernate.type.TextType")
private String abstrct;
/*
......
......@@ -61,7 +61,7 @@ public class RepositoryFile extends AuditedVersionedModelWithoutId implements Ac
/** The id. */
@Id
@GeneratedValue(strategy = GenerationType.TABLE)
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(unique = true, nullable = false, length = 20)
private Long id = InMemoryIdGenerator.nextId();
......@@ -90,11 +90,13 @@ public class RepositoryFile extends AuditedVersionedModelWithoutId implements Ac
/** The subject. */
@Column
@Lob
@Type(type = "org.hibernate.type.TextType")
private String subject;
/** The description. */
@Column
@Lob
@Type(type = "org.hibernate.type.TextType")
private String description;
/** The creator. */
......@@ -128,6 +130,7 @@ public class RepositoryFile extends AuditedVersionedModelWithoutId implements Ac
/** The bibliographic citation. */
@Column
@Lob
@Type(type = "org.hibernate.type.TextType")
private String bibliographicCitation;
/** URL where the resource was originally retrieved from. */
......
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