-->
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: UserTypes that are NOT java.sql.Types
PostPosted: Wed Nov 15, 2006 3:54 pm 
Newbie

Joined: Wed Nov 15, 2006 1:00 pm
Posts: 1
Hello,

I have minor problems with my UserTypes. The db types I want to map to are Postgres: box, path, point types which are not in: java.sql.Types.

However in the UserType I have to define the method:
public int[] sqlTypes(){
return new int[] { Types.OTHER};
}

I decided to return OTHER since I did not know what else to do. Other does not work at all and, when I change it to anything else the sql statement is rendered wrong (by the way, this only happens in union subclass mapping and not in joined subclass mapping):

"null::varchar as bounds, "

which should be:

"null::box as bounds, "

I looked around for a long time but I just cant find a way how to let hibernate render the query with "box" instead of any other type.

Do I maybe have to define a Type instead of a UserType?

Thanks for any help.

Phil


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.