jeudi 2 avril 2015

Set Default boolean values in multiple database using common code

I am working on an application which has to support Oracle,MYSQL,MSSQL and Postgres and there is a need to maintain common application for these databases. I had been using the ColumnDefinition attribute in the @Column annotation to set default values to false for all boolean values(for MYSQL and MSSQL) but now using the same code does not work on oracle as oracle does not support the boolean database. I cannot change the datatype to some other type for boolean values(like Int(1) or char(1))


Is there a way to somehow use the same code that works across all the databases mentioned above?


Aucun commentaire:

Enregistrer un commentaire