2 ms·
You can go through your code and change all of your SQL to match the PostgreSQL dialect. Or (with Hibernate) you change one configuration parameter (the hbm2ddl
by bunderbunder 15y ago
You can go through your code and change all of your SQL to match the PostgreSQL dialect. Or (with Hibernate) you change one configuration parameter (the hbm2ddl one) to use the MySQL dialect as opposed to the PostgreSQL one.
I hear ease of switching often being given as an advantage of ORMs. What worries me is that this might be code for, "You have to settle for the least common denominator."
For example, in the PostgreSQL/MySQL example: Will Hibernate recognize when it's appropriate to use a common table expression when working with PostgreSQL, and also degrade to something that works with MySQL's feature set when you switch? Or will Hibernate take advantage of MySQL's INSERT IGNORE statement, and happily switch to MERGE if you go over to Oracle?