Switching between databases using hibernate

Discussion in 'Java' started by josh.s17, Aug 4, 2006.

  1. josh.s17

    josh.s17 Guest


    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.

    josh.s17, Aug 4, 2006
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.