mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 23:13:10 +00:00
In Hibernate 6, to support Postgres + H2, all @Lob columns must now be Length.LONG32
This commit is contained in:
@@ -18,7 +18,6 @@ import jakarta.persistence.GeneratedValue;
|
|||||||
import jakarta.persistence.GenerationType;
|
import jakarta.persistence.GenerationType;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.JoinColumn;
|
import jakarta.persistence.JoinColumn;
|
||||||
import jakarta.persistence.Lob;
|
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
import jakarta.persistence.SequenceGenerator;
|
import jakarta.persistence.SequenceGenerator;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -31,6 +30,7 @@ import org.dspace.core.HibernateProxyHelper;
|
|||||||
import org.dspace.core.ReloadableEntity;
|
import org.dspace.core.ReloadableEntity;
|
||||||
import org.dspace.eperson.EPerson;
|
import org.dspace.eperson.EPerson;
|
||||||
import org.dspace.eperson.Group;
|
import org.dspace.eperson.Group;
|
||||||
|
import org.hibernate.Length;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database entity representation of the ResourcePolicy table
|
* Database entity representation of the ResourcePolicy table
|
||||||
@@ -98,8 +98,7 @@ public class ResourcePolicy implements ReloadableEntity<Integer> {
|
|||||||
@Column(name = "rptype", length = 30)
|
@Column(name = "rptype", length = 30)
|
||||||
private String rptype;
|
private String rptype;
|
||||||
|
|
||||||
@Lob
|
@Column(name = "rpdescription", length = Length.LONG32)
|
||||||
@Column(name = "rpdescription", columnDefinition = "text")
|
|
||||||
private String rpdescription;
|
private String rpdescription;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -57,8 +57,6 @@ public class MetadataField implements ReloadableEntity<Integer> {
|
|||||||
@Column(name = "qualifier", length = 64)
|
@Column(name = "qualifier", length = 64)
|
||||||
private String qualifier = null;
|
private String qualifier = null;
|
||||||
|
|
||||||
// @Column(name = "scope_note")
|
|
||||||
// @Lob
|
|
||||||
@Column(name = "scope_note", columnDefinition = "text")
|
@Column(name = "scope_note", columnDefinition = "text")
|
||||||
private String scopeNote;
|
private String scopeNote;
|
||||||
|
|
||||||
|
@@ -15,7 +15,6 @@ import jakarta.persistence.GeneratedValue;
|
|||||||
import jakarta.persistence.GenerationType;
|
import jakarta.persistence.GenerationType;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.JoinColumn;
|
import jakarta.persistence.JoinColumn;
|
||||||
import jakarta.persistence.Lob;
|
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
import jakarta.persistence.SequenceGenerator;
|
import jakarta.persistence.SequenceGenerator;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -23,6 +22,7 @@ import jakarta.persistence.Transient;
|
|||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.HibernateProxyHelper;
|
import org.dspace.core.HibernateProxyHelper;
|
||||||
import org.dspace.core.ReloadableEntity;
|
import org.dspace.core.ReloadableEntity;
|
||||||
|
import org.hibernate.Length;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database access class representing a Dublin Core metadata value.
|
* Database access class representing a Dublin Core metadata value.
|
||||||
@@ -57,8 +57,7 @@ public class MetadataValue implements ReloadableEntity<Integer> {
|
|||||||
/**
|
/**
|
||||||
* The value of the field
|
* The value of the field
|
||||||
*/
|
*/
|
||||||
@Lob
|
@Column(name = "text_value", length = Length.LONG32)
|
||||||
@Column(name = "text_value", columnDefinition = "text")
|
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -17,7 +17,6 @@ import jakarta.persistence.GeneratedValue;
|
|||||||
import jakarta.persistence.GenerationType;
|
import jakarta.persistence.GenerationType;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.JoinColumn;
|
import jakarta.persistence.JoinColumn;
|
||||||
import jakarta.persistence.Lob;
|
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
import jakarta.persistence.SequenceGenerator;
|
import jakarta.persistence.SequenceGenerator;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -25,6 +24,7 @@ import jakarta.persistence.Temporal;
|
|||||||
import jakarta.persistence.TemporalType;
|
import jakarta.persistence.TemporalType;
|
||||||
import org.dspace.content.Item;
|
import org.dspace.content.Item;
|
||||||
import org.dspace.core.ReloadableEntity;
|
import org.dspace.core.ReloadableEntity;
|
||||||
|
import org.hibernate.Length;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ORCID history entity that it contains information relating to an attempt
|
* The ORCID history entity that it contains information relating to an attempt
|
||||||
@@ -78,16 +78,14 @@ public class OrcidHistory implements ReloadableEntity<Integer> {
|
|||||||
/**
|
/**
|
||||||
* A description of the synchronized resource.
|
* A description of the synchronized resource.
|
||||||
*/
|
*/
|
||||||
@Lob
|
@Column(name = "description", length = Length.LONG32)
|
||||||
@Column(name = "description", columnDefinition = "text")
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The signature of the synchronized metadata. This is used when the entity is
|
* The signature of the synchronized metadata. This is used when the entity is
|
||||||
* the owner itself.
|
* the owner itself.
|
||||||
*/
|
*/
|
||||||
@Lob
|
@Column(name = "metadata", length = Length.LONG32)
|
||||||
@Column(name = "metadata", columnDefinition = "text")
|
|
||||||
private String metadata;
|
private String metadata;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -100,8 +98,7 @@ public class OrcidHistory implements ReloadableEntity<Integer> {
|
|||||||
/**
|
/**
|
||||||
* The response message incoming from ORCID.
|
* The response message incoming from ORCID.
|
||||||
*/
|
*/
|
||||||
@Lob
|
@Column(name = "response_message", length = Length.LONG32)
|
||||||
@Column(name = "response_message", columnDefinition = "text")
|
|
||||||
private String responseMessage;
|
private String responseMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -20,12 +20,12 @@ import jakarta.persistence.GeneratedValue;
|
|||||||
import jakarta.persistence.GenerationType;
|
import jakarta.persistence.GenerationType;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.JoinColumn;
|
import jakarta.persistence.JoinColumn;
|
||||||
import jakarta.persistence.Lob;
|
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
import jakarta.persistence.SequenceGenerator;
|
import jakarta.persistence.SequenceGenerator;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
import org.dspace.content.Item;
|
import org.dspace.content.Item;
|
||||||
import org.dspace.core.ReloadableEntity;
|
import org.dspace.core.ReloadableEntity;
|
||||||
|
import org.hibernate.Length;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity that model a record on the ORCID synchronization queue. Each record in
|
* Entity that model a record on the ORCID synchronization queue. Each record in
|
||||||
@@ -63,8 +63,7 @@ public class OrcidQueue implements ReloadableEntity<Integer> {
|
|||||||
/**
|
/**
|
||||||
* A description of the resource to be synchronized.
|
* A description of the resource to be synchronized.
|
||||||
*/
|
*/
|
||||||
@Lob
|
@Column(name = "description", length = Length.LONG32)
|
||||||
@Column(name = "description", columnDefinition = "text")
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -85,8 +84,7 @@ public class OrcidQueue implements ReloadableEntity<Integer> {
|
|||||||
* The signature of the metadata to be synchronized. This is used when the
|
* The signature of the metadata to be synchronized. This is used when the
|
||||||
* entity is the owner itself.
|
* entity is the owner itself.
|
||||||
*/
|
*/
|
||||||
@Lob
|
@Column(name = "metadata", length = Length.LONG32)
|
||||||
@Column(name = "metadata", columnDefinition = "text")
|
|
||||||
private String metadata;
|
private String metadata;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,6 @@ import jakarta.persistence.GenerationType;
|
|||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.JoinColumn;
|
import jakarta.persistence.JoinColumn;
|
||||||
import jakarta.persistence.JoinTable;
|
import jakarta.persistence.JoinTable;
|
||||||
import jakarta.persistence.Lob;
|
|
||||||
import jakarta.persistence.ManyToMany;
|
import jakarta.persistence.ManyToMany;
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
import jakarta.persistence.SequenceGenerator;
|
import jakarta.persistence.SequenceGenerator;
|
||||||
@@ -36,6 +35,7 @@ import org.dspace.content.ProcessStatus;
|
|||||||
import org.dspace.core.ReloadableEntity;
|
import org.dspace.core.ReloadableEntity;
|
||||||
import org.dspace.eperson.EPerson;
|
import org.dspace.eperson.EPerson;
|
||||||
import org.dspace.eperson.Group;
|
import org.dspace.eperson.Group;
|
||||||
|
import org.hibernate.Length;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is the DB Entity representation of the Process object to be stored in the Database
|
* This class is the DB Entity representation of the Process object to be stored in the Database
|
||||||
@@ -69,8 +69,7 @@ public class Process implements ReloadableEntity<Integer> {
|
|||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
private ProcessStatus processStatus;
|
private ProcessStatus processStatus;
|
||||||
|
|
||||||
@Lob
|
@Column(name = "parameters", length = Length.LONG32)
|
||||||
@Column(name = "parameters", columnDefinition = "text")
|
|
||||||
private String parameters;
|
private String parameters;
|
||||||
|
|
||||||
@ManyToMany(fetch = FetchType.LAZY)
|
@ManyToMany(fetch = FetchType.LAZY)
|
||||||
|
@@ -43,18 +43,12 @@ public class ClaimedTask implements ReloadableEntity<Integer> {
|
|||||||
@JoinColumn(name = "workflowitem_id")
|
@JoinColumn(name = "workflowitem_id")
|
||||||
private XmlWorkflowItem workflowItem;
|
private XmlWorkflowItem workflowItem;
|
||||||
|
|
||||||
// @Column(name = "workflow_id")
|
|
||||||
// @Lob
|
|
||||||
@Column(name = "workflow_id", columnDefinition = "text")
|
@Column(name = "workflow_id", columnDefinition = "text")
|
||||||
private String workflowId;
|
private String workflowId;
|
||||||
|
|
||||||
// @Column(name = "step_id")
|
|
||||||
// @Lob
|
|
||||||
@Column(name = "step_id", columnDefinition = "text")
|
@Column(name = "step_id", columnDefinition = "text")
|
||||||
private String stepId;
|
private String stepId;
|
||||||
|
|
||||||
// @Column(name = "action_id")
|
|
||||||
// @Lob
|
|
||||||
@Column(name = "action_id", columnDefinition = "text")
|
@Column(name = "action_id", columnDefinition = "text")
|
||||||
private String actionId;
|
private String actionId;
|
||||||
|
|
||||||
|
@@ -44,8 +44,6 @@ public class CollectionRole implements ReloadableEntity<Integer> {
|
|||||||
@SequenceGenerator(name = "cwf_collectionrole_seq", sequenceName = "cwf_collectionrole_seq", allocationSize = 1)
|
@SequenceGenerator(name = "cwf_collectionrole_seq", sequenceName = "cwf_collectionrole_seq", allocationSize = 1)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
// @Column(name = "role_id")
|
|
||||||
// @Lob
|
|
||||||
@Column(name = "role_id", columnDefinition = "text")
|
@Column(name = "role_id", columnDefinition = "text")
|
||||||
private String roleId;
|
private String roleId;
|
||||||
|
|
||||||
|
@@ -45,18 +45,12 @@ public class PoolTask implements ReloadableEntity<Integer> {
|
|||||||
@JoinColumn(name = "workflowitem_id")
|
@JoinColumn(name = "workflowitem_id")
|
||||||
private XmlWorkflowItem workflowItem;
|
private XmlWorkflowItem workflowItem;
|
||||||
|
|
||||||
// @Column(name = "workflow_id")
|
|
||||||
// @Lob
|
|
||||||
@Column(name = "workflow_id", columnDefinition = "text")
|
@Column(name = "workflow_id", columnDefinition = "text")
|
||||||
private String workflowId;
|
private String workflowId;
|
||||||
|
|
||||||
// @Column(name = "step_id")
|
|
||||||
// @Lob
|
|
||||||
@Column(name = "step_id", columnDefinition = "text")
|
@Column(name = "step_id", columnDefinition = "text")
|
||||||
private String stepId;
|
private String stepId;
|
||||||
|
|
||||||
// @Column(name = "action_id")
|
|
||||||
// @Lob
|
|
||||||
@Column(name = "action_id", columnDefinition = "text")
|
@Column(name = "action_id", columnDefinition = "text")
|
||||||
private String actionId;
|
private String actionId;
|
||||||
|
|
||||||
|
@@ -44,8 +44,6 @@ public class WorkflowItemRole implements ReloadableEntity<Integer> {
|
|||||||
@SequenceGenerator(name = "cwf_workflowitemrole_seq", sequenceName = "cwf_workflowitemrole_seq", allocationSize = 1)
|
@SequenceGenerator(name = "cwf_workflowitemrole_seq", sequenceName = "cwf_workflowitemrole_seq", allocationSize = 1)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
// @Column(name = "role_id")
|
|
||||||
// @Lob
|
|
||||||
@Column(name = "role_id", columnDefinition = "text")
|
@Column(name = "role_id", columnDefinition = "text")
|
||||||
private String roleId;
|
private String roleId;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user