File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Hibernate mapping oracle char
Joined: May 29, 2002
May 31, 2006 21:52:00
I have db field of type char(4).
I use hibernate to get this particular field .
The type specified in hibernate file is as below
<property name="abc" type="string">
<column name="abc" length="4" />
I also tried giving sql-type=char(4).
I used createSQLQuery method of hibernate session to get this value .
But I get only the first character of the field value.
Can anybody suggest why?
Joined: Jun 06, 2006
Jun 06, 2006 12:14:00
does the Java bean that you map to define the property 'abc' as a
The Java char primative, or
class still only old one character.
I found that char(s) in the datbase map to
, or "text" types in hibernate.
Error: Keyboard not attached. Press F1 to continue.
I agree. Here's the link:
subject: Hibernate mapping oracle char
how to insert
Mapping Problem in Hibernate
Hibernate insert or select gives "Identifier of an instance altered"
JOIN syntax for HQL . Need help!
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014