-->
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.  [ 2 posts ] 
Author Message
 Post subject: HIbernate-Postgres insert problem
PostPosted: Thu Jun 14, 2007 6:00 am 
Newbie

Joined: Thu Jun 14, 2007 5:41 am
Posts: 3
HI all

I have a problem that when i execute an insert statment on a postgres DB the & this get me this error

ERROR JDBCExceptionReporter:78 - Batch entry 0 insert into bankaccounts (BANK_NAME, BANK_CODE, SWIFT_CODE, ACCOUNT_NUMBER, SUB_TYPE, CONTACT_LIST_FK, ID) values (NULL, NULL, Test SwiftCode, 122334, NULL, 2c928a8c1276a26d011276a276690001, 2c928a88132960fd0113296134790001) was aborted. Call getNextException to see the cause.
11:37:22,759 ERROR JDBCExceptionReporter:78 - ERROR: column "sub_type" is of type integer but expression is of type character varying

the first thing come to mind that there is a problem in sub_type column so i removed it from the insert & try the statment directly to the DB then i found the big problem is that when hibernate generates the insert statmens that includes null values it types ' ' but not NULL & the databse accepts this in string values & this itself is not accptable for me.

although i configured the right driver, the right dialact & the sql mapping(androMDA)

thnx for any reply

_________________
best regards,,,

Mohamed Badawy


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 14, 2007 6:25 am 
Regular
Regular

Joined: Mon Apr 02, 2007 3:54 am
Posts: 67
Location: Hyderabad
can you send the code that How are you performing insert ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.