I can put a null element into a set and it is successfully persisted into the database. But after I retrieve it back, the null element is gone.
How to get the null element back?
Hers is the map file( the set contains all the addresses a person has.):
Code:
<class name="user.UserInfo" table="user_info">
<id name="id" type="int">
<column name="id" />
<generator class="native"/>
</id>
...
<set name="addresses" table="User_Addr" inverse="false" cascade="all" lazy="true">
<key column="userId"/>
<element column="address" type="string" not-null="false"/>
</set>
</class>