We have a database which needs to work on both Oracle and SQLServer, and we're using Hibernate to talk to it (obviously). Currently we're using Hibernate 3.0.5 and Annotations 3.0beta2, but those could change if necessary.
We have a few fields which are BIT fields in SQLServer, which obviously Oracle doesn't support. The normal way round this for Oracle is to use a CHAR(1) field and T/F, 0/1, Y/N or something similar.
Is there any way to express this in annotations, such that I can declare a property with a boolean type, and the appropriate type converter will be used? If not, I guess we'll convert all of the fields to TINYINTs or something similar, but it would be nice not to have to.
|