Yeah, I finally went back to that method and it seems to have gotten me
going again.  It was a long time since I had problems with doing it that
way, so whatever the problems were they may have been fixed.

I've tried DBUnit but it can't handle circular relationships in databases.
At least the last version I looked at, 2.2 I think it was.  I saw others
were having the exact same problems because if two tables depend on each
other, DBUnit wasn't smart enough to figure out how to drop the constraints
in order to remove the tables for some reason.  This caused me to have to
find other options.  Dealing with database tests is messy no matter how you
do it.  I'm just glad I'm finally up and going again.  I think I may try
switching over to HSQL....

On Dec 1, 2007 11:55 AM, Marco Mistroni <[EMAIL PROTECTED]> wrote:

> Hi,
>  if u use hibernate.hbm.ddl=true to generate your tables, hibernate will
> take care
> of building tables for proper database you'll specify
> if you then use dbunit to populate tables, dbunit will take care too of
> handling
> database issues...
>
> hth
>  marco
>
> On Dec 1, 2007 3:53 PM, Ryan Moquin <[EMAIL PROTECTED]> wrote:
>
> > I think my main concern with this (hence why I'm asking general advice)
> is
> > that sometimes a unit test might work against HSQL and fail against
> > another
> > database such as MSSQL?  Or am I worrying about something I shouldn't?
> >
> > I did make some progress finally though, I kept connection pooling on in
> > my
> > unit tests since I don't think it's possible for me to run my build
> > without
> > it, and then I stopped using the maven-sql-plugin and went back to the
> > hibernate ddl create-drop method of recreating my schema (which I ran
> into
> > problems with, which caused me to go to maven-sql-plugin previously).
> >  That
> > alleviates the database in use when the plugin tries to drop and
> recreate
> > it.
> >
> > Of course, this doesn't answer whether or not I should be using an inmem
> > database like HSQL ... I think depending on people's experiences on the
> > pros
> > and cons will be what will cause me to switch.  I'm just worried that I
> > might lose some accuracy in my unit tests going to that approach?
> >
> > On Dec 1, 2007 9:39 AM, Paul MERLIN <[EMAIL PROTECTED]> wrote:
> >
> > > Le Saturday 01 December 2007 14:14:37 Marco Mistroni, vous avez écrit:
> > > > Hi,
> > > >  have u ever tried to use HSQL , in memory db?
> > >
> > > Maybe this will help you get started with unit testing entities in
> > memory
> > > with
> > > maven :
> > >
> > >
> >
> http://eskatos.wordpress.com/2007/10/15/unit-test-jpa-entities-with-in-memory-database/
> > >
> > > Paul
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>

Reply via email to