-->
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.  [ 3 posts ] 
Author Message
 Post subject: NativeQuery return wrong type
PostPosted: Tue Jun 08, 2010 5:58 am 
Newbie

Joined: Mon Feb 01, 2010 9:29 am
Posts: 9
jdbc SQL return String(just one column) but Hibernate createNativeQuery return Character, is there any way to define the correct type.

Is the SqlResultSetMapping solution and how to define it in persistence.xml(without anotation).

Regards, T


Top
 Profile  
 
 Post subject: Re: NativeQuery return wrong type
PostPosted: Tue Jun 08, 2010 7:36 am 
Newbie

Joined: Mon Feb 01, 2010 9:29 am
Posts: 9
In my MySQL I have defined column CHAR(66), when using Hiberanete native query and getResultList, when I'm trying to get all characters from column I only get first char. Is there any way to get all 66 chars?


Regards; t


Top
 Profile  
 
 Post subject: Re: NativeQuery return wrong type
PostPosted: Tue Jun 08, 2010 8:07 am 
Newbie

Joined: Mon Feb 01, 2010 9:29 am
Posts: 9
Is this a bug of Hibernate that column with type CHAR(xx) treat as a Java Character, for me this is a BUG


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

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.