cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan José Gil <mat...@gmail.com>
Subject Unit Testing cayenne apps
Date Tue, 23 Apr 2013 12:05:00 GMT
Hi, I'm using cayenne as persistence layer.

The project is builded with maven and developed with Eclipse.

The DB is migrated using flyway (http://flywaydb.org/) and I'm using
different DBs config for:

 * production
 * development
 * testing

So, for migrations, deployment, continuous integration and anything that
relies on maven I'm using maven "filtering" capabilities to define the jdbc
url of the database to be used.

BUT when I'm working at eclipse, and try to run my tests / startup my
webapp, I cant filter the project resources (not automatically at least)
So currently I'm copy-pasting my cayenne conf from src/main/resources/db to
src/test/resources/db... and I'm not happy with this solution, I feel it
smelly, propense to failure, it's ugly, very ugly!

I did try to only define the cayenne config at testing resources, but when
I do that, it doesn't find the mapping xml.

Is there a way con pass the mapping path instead of a mapping name to a
cayenne config?

Can someone point me what should be done to avoid this code/conf smell?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message