-->
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: Not running as expected!!
PostPosted: Fri Jul 14, 2006 4:00 am 
Beginner
Beginner

Joined: Wed May 10, 2006 9:43 pm
Posts: 30
Location: Australia
Hi everyone,

I've been using Hibernate for a while now and everything seems to be going okay. I'm beginning to implement the DAO's for the objects. Focusing on "Retrieve" as a parser will be written to insert the data.

I have a problem that I haven't been able to find a solution for.

I created the tables using a java class called execute. Within this class I have been setting the values for the fields just as a test. These values were inserted successfully.

I am now wanting to test the data access objects I have been creating.

And here's my problem:

When I run the manager class which has my retrieve method, the values I set in the database are deleted as the program creates the tables again.

I tried to:

- Block out the references to the mapping file in hibernate.cfg.xml - no luck - an error occur asking for the "X" Mapping file.

- Take out the execute methods that create the tables and set the values.

If you could help that would be great, please post your suggestion. I know this is one of those things that is really hard to help with.

Thanks, Alyssa.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 14, 2006 5:57 am 
Regular
Regular

Joined: Tue May 16, 2006 3:32 am
Posts: 117
Comment out the following property in your configuration file or use some other option than 'create':


<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">create</property>


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.