-->
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: org.hibernate.exception.SQLGrammarException:
PostPosted: Tue Aug 07, 2012 8:26 pm 
Newbie

Joined: Tue Aug 07, 2012 8:16 pm
Posts: 1
Hi ,
I am getting the following error while accessing the application.

org.hibernate.exception.SQLGrammarException: ERROR: column "COL1" is of type numeric but expression is of type boolean

The column is defined as numeric(1,0) in postgresql database and
the corresponding declaration in entity is Boolean.

In the MyPostgreSQLDialect constructor (MyPostgreSQLDialect class extends PostgresPlusDialect)
i have the following code:
registerColumnType(java.sql.Types.BOOLEAN, "numeric(1, 0)");

If i don;t have the above line, i am getting error while the application is loading. If the above line exists then the application is loaded fine. But while accessing the application, i am getting the below error:
org.hibernate.exception.SQLGrammarException: ERROR: column "COL1" is of type numeric but expression is of type boolean

Can any one help me on this?


Thanks
Madhu


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.