From 7637df68f2f0150a2777ed6b613b450f4528a8fe Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@bioforsk.no> Date: Mon, 10 Oct 2016 12:06:21 -0700 Subject: [PATCH] Updated to Hibernate 5.0.10 (Removing the @Type annotation) --- pom.xml | 25 +++++++++++++------ .../java/no/nibio/vips/logic/entity/Gis.java | 4 +-- .../nibio/vips/logic/entity/Organization.java | 2 +- .../nibio/vips/logic/gis/GeometryEntity.java | 2 +- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index e538064c..718e74b4 100644 --- a/pom.xml +++ b/pom.xml @@ -19,10 +19,10 @@ <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> - <repository> + <!--repository> <id>Hibernate Spatial repo</id> <url>http://www.hibernatespatial.org/repository</url> - </repository> + </repository--> </repositories> <dependencies> @@ -34,8 +34,7 @@ <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-spatial</artifactId> - <version>4.3</version> - <scope>provided</scope> + <version>5.0.10.Final</version> <exclusions> <exclusion> <artifactId>postgresql</artifactId> @@ -137,6 +136,18 @@ <artifactId>passay</artifactId> <version>1.1.0</version> </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-core</artifactId> + <version>5.0.10.Final</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.postgresql</groupId> + <artifactId>postgresql</artifactId> + <version>9.4.1211</version> + <scope>provided</scope> + </dependency> <dependency> <groupId>javax</groupId> <artifactId>javaee-web-api</artifactId> @@ -183,12 +194,12 @@ <artifactId>jaxen</artifactId> <version>1.1.1</version> </dependency> -<dependency> +<!--dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> - <version>9.4-1206-jdbc42</version> + <version>9.4-1211</version> <scope>provided</scope> -</dependency> +</dependency--> </dependencies> <build> diff --git a/src/main/java/no/nibio/vips/logic/entity/Gis.java b/src/main/java/no/nibio/vips/logic/entity/Gis.java index 75a7079a..99a8caf1 100644 --- a/src/main/java/no/nibio/vips/logic/entity/Gis.java +++ b/src/main/java/no/nibio/vips/logic/entity/Gis.java @@ -32,7 +32,7 @@ import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.xml.bind.annotation.XmlRootElement; -import org.hibernate.annotations.Type; +//import org.hibernate.annotations.Type; /** * @copyright 2015 <a href="http://www.nibio.no/">NIBIO</a> @@ -54,7 +54,7 @@ public class Gis implements Serializable { @Column(name = "gis_id") private Integer gisId; @JsonIgnore - @Type(type = "org.hibernate.spatial.GeometryType") + //@Type(type = "org.hibernate.spatial.GeometryType") @Column(name = "gis_geom", columnDefinition = "Geometry") private Geometry gisGeom; diff --git a/src/main/java/no/nibio/vips/logic/entity/Organization.java b/src/main/java/no/nibio/vips/logic/entity/Organization.java index 1f2db83f..46397415 100644 --- a/src/main/java/no/nibio/vips/logic/entity/Organization.java +++ b/src/main/java/no/nibio/vips/logic/entity/Organization.java @@ -86,7 +86,7 @@ public class Organization implements Serializable { @Column(name = "default_vips_core_user_id") private Integer defaultVipsCoreUserId; @JsonIgnore - @Type(type = "org.hibernate.spatial.GeometryType") + //@Type(type = "org.hibernate.spatial.GeometryType") @Column(name = "default_map_center", columnDefinition = "Geometry") private Point defaultMapCenter; @OneToMany(mappedBy = "parentOrganizationId", fetch = FetchType.EAGER) diff --git a/src/main/java/no/nibio/vips/logic/gis/GeometryEntity.java b/src/main/java/no/nibio/vips/logic/gis/GeometryEntity.java index 96503a18..81fc2d34 100644 --- a/src/main/java/no/nibio/vips/logic/gis/GeometryEntity.java +++ b/src/main/java/no/nibio/vips/logic/gis/GeometryEntity.java @@ -53,7 +53,7 @@ public class GeometryEntity implements Serializable { @GeneratedValue(strategy = GenerationType.AUTO) private Long id; - @Type(type = "org.hibernate.spatial.GeometryType") + //@Type(type = "org.hibernate.spatial.GeometryType") @Column(name = "geometry_value", columnDefinition = "Geometry") private Geometry geometryValue; -- GitLab