Hibernate version:
3.1.3
In my database, date fields are often stored as seven-digit numeric fields, in the format CYYMMDD. I have created a UserType to map these numeric fields to a java.util.Date.
My problem is this: in my NullSafeGet() method, the value retrieved from the DB for these numeric date fields will sometimes be "0". Since java.util.Date doesn't really offer a way to represent a blank date, I can choose to return null from the method, but that means that every time I use this UserType in my Java code, I'll have to check that the reference isn't null.
Does anyone know of a better way to handle this?
Thanks,
Curt
|