Hey guys. I'm having some good times here with Oracle 9 and Hibernate 2. Turns out that when you store an empty string in a varchar column in Oracle, Oracle stores a null for you instead. This creates fun havoc with hibernate's dirtiness check, resulting in a lot of unnecessary database traffic.
Yes, I know this is a misbehavior in Oracle. Question is, what do folks do to work around this? Answers seem to include developing a simple custom UserType or whatever, or patching the getters for all string values which might ever be empty to read something like:
Code:
public String getPath() {
return "".equals(path) ? null : path;
}
Any other bright ideas? Any notion what the "best" solution is?