With the following mapping file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="net.woodenstar.model.shopcenter.GroupItem" table="GROUP_ITEMS">
<id name="id" type="int">
<column name="SHC_GIT_ID" />
<generator class="org.hibernate.id.enhanced.SequenceStyleGenerator">
<param name="sequence_name">GROUP_ITEMS_SEQUENCE</param>
<param name="optimizer">none</param>
<param name="increment_size">1</param>
</generator>
</id>
<property name="name" type="string">
<column name="SHC_GIT_NAME" length="30" unique="false" not-null="true" />
</property>
</class>
the model GroupItem is being saved without any hesitation, but when it comes to:
List<GroupItem> result = query.list();
the result is a list with the members of null. The dbms is mysql.
UPDATE ONE
the query:
from net.woodenstar.model.shopcenter.GroupItem e where 1=1 order by e.id
