christian wrote:
No, what the Hibernate team says is: 0 is not NULL and Hibernate will not provide functionality to map NULL to 0. Use a custom UserType if you are sure what you are doing.
It really doesn't seem like we are on the same page. I appreciate your timely replies, but just have these questions:
1. How do YOU (personally) map booleans? If with a primative, then I think you must have a not-null constraint. If with an Object, doesn't that make your controller/UI logic more complicated?
2. Once you commit to adding a not-null constraint, how do you want your PL/SQL, perl, etc sctripts to handle inserting? Should each script know that we want to put a zero/false into these oracle columns? Isn't it much better to define that in one place, the DDL?
3. I don't really see this as hibernate functionality per se, but a feature of the hbm2ddl tool. Outside of that tool, the entire hibernate codebase could ignore the default attribute we are discussing.
4. Do you see JDK 1.5's autoboxing feature having an effect on the above three questions?
Thanks for the help,
Ted