-->
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: Chapter 16, pg 736 Writing a DBUnit superclass
PostPosted: Mon Aug 03, 2009 6:01 pm 
Newbie

Joined: Thu Jul 24, 2008 1:23 pm
Posts: 16
Hi All,

I have followed the HibernateIntegrationTest class example on pgs 737-738.
The prepareDataSet() method does not load the data from the basedata.xml file
into the database table. It finds the file but the data is not inserted. Any ideas
on what I am doing wrong? (BTW, the rest of the example works if the data is
loaded by some other method.)

Thanks,
Steve


Top
 Profile  
 
 Post subject: Re: Chapter 16, pg 736 Writing a DBUnit superclass
PostPosted: Tue Aug 04, 2009 4:22 pm 
Newbie

Joined: Thu Jul 24, 2008 1:23 pm
Posts: 16
I am trying to use the DatabaseOperation.CLEAN_INSERT op within the prepareSettings() method,
as shown on page 741. I have noticed that the "delete all" part of that operation works, but not
the "insert" part. I tried replacing CLEAN_INSERT with DELETE_ALL and INSERT but neither one of
those work.

I am using this code with a table held in a DB2 v9 database. Is this part of the problem?

Thanks again.


Top
 Profile  
 
 Post subject: Re: Chapter 16, pg 736 Writing a DBUnit superclass
PostPosted: Tue Aug 04, 2009 4:36 pm 
Newbie

Joined: Thu Jul 24, 2008 1:23 pm
Posts: 16
OK, think I finally found the answer here:

https://forum.hibernate.org/viewtopic.php?f=1&t=970523&hilit=DBUnit

Does this seem like the right solution?


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.