-->
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: postgresql
PostPosted: Tue Nov 22, 2011 6:59 am 
Newbie

Joined: Tue Nov 22, 2011 6:49 am
Posts: 3
Dear all

I am connecting to postgresql via hibernate. I can create tables and drop them but I cannot insert data into the tables. The log message shows every thing is correct and ends with this message :

Hibernate: insert into contact (FIRSTNAME, LASTNAME, EMAIL, ID) values (?, ?, ?, ?)

But nothing is inserted into the databse!
Also the "hibernate.hbm2ddl.auto" property is update which seems to be right. I use the example of the tutorial.

Any idea?

Thank you for your help,
Arman


Top
 Profile  
 
 Post subject: Re: postgresql
PostPosted: Tue Nov 22, 2011 8:42 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
My first guess is that you are not committing the transaction, which means that anything inserted or updated will be rolled back when the session is over.


Top
 Profile  
 
 Post subject: Re: postgresql
PostPosted: Wed Nov 23, 2011 10:12 am 
Newbie

Joined: Tue Nov 22, 2011 6:49 am
Posts: 3
yes, you are right. Thanks!


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.