Hibernate / JPA -> Nullable values & objects?
问题 My basic question is: How can I force Hibernate to make float NULLable and accept NULL for float, datetime, blob, respectively? I really mean NULL, not (float) 0.0. Even worse, when I try to store an object with the desired NULLable fields actually being NULL and using entity manager, I get errors for attributes, which are marked as NULLable by Hibernate even in the db table. Here is what I have been trying in vain: Consider this table: +--------+--------------+------+-----+---------+--------