-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate mapping java.util.UUID as Geometry
PostPosted: Fri May 27, 2016 6:16 am 
Newbie

Joined: Fri May 27, 2016 6:08 am
Posts: 1
Hi!

I've got an issue in my project, perhaps somebody can lend me a hand. Currently I'm using Hibernate 5.1.0 with Postgresql 9.1 database.

The thing is that I've got several classes, whose identifiers are UUID fields (some of them generated by the database). I use hbm.xml files to map classes into the database. I don't know why, hibernate maps those UUID fields as Geometry data type. Those classes have Point or LineString values, but this has nothing to do with UUIDs.

Here it's one example:

Java class:
Code:
import java.util.UUID;
...
public class ParadaBus implements Serializable {
...
private UUID uuid;
...
}


Hbm file:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
   "Hibernate Mapping 3.0"
   "http://hibernate.org/dtd/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
   
   <class name="com.ingartek.cavwebapp.model.ParadaBus" table="PARADASBUS">
      
      <id name="uuid" column="ID_PARADABUS" type="org.hibernate.type.PostgresUUIDType">
         <generator class="assigned" />
      </id>
                ...
        </class>
</hibernate-mapping>


Am I doing something wrong?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.