Switching between databases using hibernate

J

josh.s17

Hi,

I've just starting using hibernate and have come across a problem that
I need some help with.

In our development environment we are planning on using hypersonic as
our database but in our production environment we will be using oracle.

In oracle we plan to use "sequence" as the generator for primary keys
and for hypersonic we plan to use "identity" (both options are not
supported by either database)

I can't see of a way of switching between the two without having to
change the hibernate mapping for every class. I was hoping to just
change the SQL driver, dialect etc when switching between development
and test and not have to change any source code or mapping files. Has
anyone come across this problem before and have a more elegant way to
solve this problem.

thanks
Josh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top