-->
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: Auction Tutorial: createTestAuctions overwrites sellers
PostPosted: Thu Apr 09, 2009 10:36 am 
Newbie

Joined: Fri Apr 28, 2006 10:14 am
Posts: 11
Location: Paris, France
When I run the auction tutorial, it seems to overwrite the objects in the database instead of creating new ones.

I don't understand why when I run it a 2nd time why don't I get new accounts created? Instead it just ovewrites the existing accounts.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 09, 2009 10:55 am 
Newbie

Joined: Fri Apr 28, 2006 10:14 am
Posts: 11
Location: Paris, France
I changed:

.setProperty(Environment.HBM2DDL_AUTO, "validate");

from create to validate to see if that was it but that gives me:

Could not synchronize database state with session

Caused by: java.sql.BatchUpdateException: failed batch
at org.hsqldb.jdbc.jdbcStatement.executeBatch(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeBatch(Unknown Source)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 09, 2009 12:20 pm 
Beginner
Beginner

Joined: Sun Dec 28, 2008 6:01 pm
Posts: 24
Did you try update? Definitely, create is not what you want. try update.

.setProperty(Environment.HBM2DDL_AUTO, "update");

_____________________________________________
Please do RATE if this post was helpful


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.