Consider the following:
-we only use native sql querys when we need to.
-in mapping files, we avoid refering to sql types, just property types/names.
-auto schema generation is only used to create developer starting points.
-Actual Sql creation scripts are kept separate for each target database.
This way, a string property might be (varchar, varchar2, long, or text) underneath, but the mapping is still the same.
Right now the only place we are breaking database independence is the occational native sql command.
The ability to have the sql-query with a dialect parameter would give the flexiblity of native sql, but allow you to easliy step back in line and support you (mysql, sql-server, and oracle targets..).
I think I alot of people use hibernate with the intent of database independence. Is it possible that a section of the faq be dedicated to gottcha's/how to stay flexible with multiple database targets?
Matt
|