emmanuel wrote:
You're not showing the right code.
Permission is not mapped.
Sorry, here it is. UserPerm extends Permission without adding anything, it's just a marker to distinguish between user permissions and user group permissions (UserGroupPerm). I'm not showing UserGroup for clarity.
<class name="com.yellowasp.usad.UserPerm" table="T_UserPerm" >
<id name="id" >
<generator class="native" />
</id>
<many-to-one
name="owner"
class="com.yellowasp.usad.User"
not-null="true"
cascade="none"
/>
<many-to-one
name="zone"
class="com.yellowasp.usad.UserZone"
not-null="true"
/>
<property name="level" type="com.yellowasp.usad.PermLevel" />
</class>