Hi schwiet,
Yes, all properties referenced in the mapping file have a getter and setter defined in the proper interface. I'm sure because it is an old mapping that mapped classes; now I'm trying to map the interfaces for scalability.
Sometimes I have joined-subclasses, sometimes no.
Here are a couple of examples of my mappings
Code:
<hibernate-mapping>
<class
name="it.innove.indesk.entities.ILanguage"
table="languages">
<id
name="id"
column="id">
<generator
class="guid" />
</id>
<property name="name" column="name" unique="true" not-null="true" />
<property name="fullName" column="full_name" not-null="true" />
<property name="deleted">
<column name="is_deleted" default="false" />
</property>
</class>
</hibernate-mapping>
----------------------------------
<hibernate-mapping>
<class name="it.innove.indesk.entities.IPerson" table="persons">
<id
name="id"
column="id">
<generator
class="guid" />
</id>
<property name="email" column="email" />
<property name="externalKey" column="external_key" />
<property name="firstName" column="first_name" />
<property name="lastName" column="last_name" />
<set
name="userAttributes"
inverse="true"
order-by="attribute asc"
fetch="join">
<key column="person" />
<one-to-many
class="it.innove.indesk.entities.IUserAttribute"/>
</set>
<set
name="referrals"
table="users_referrals"
fetch="join" >
<key column="user" />
<many-to-many column="referral" class="it.innove.indesk.entities.IIncidentReferral" />
</set>
<property name="deleted">
<column name="is_deleted" default="false" />
</property>
<many-to-one
name="company"
column="company"
class="it.innove.indesk.entities.ICompany"
fetch="join"
not-null="false" />
<joined-subclass name="it.innove.indesk.entities.IUser" table="users">
<key column="id" />
<property name="username" column="username" />
<property name="salt" column="salt" />
<property name="accountNonExpired" column="account_non_expired" />
<property name="accountNonLocked" column="account_non_locked" />
<property name="credentialsNonExpired" column="credentials_non_expired" />
<property name="enabled" column="enabled" />
<property name="admin" column="is_admin" />
<set
name="roles"
table="users_roles"
lazy="true">
<key column="user" />
<many-to-many column="role" class="it.innove.indesk.entities.IRole" />
</set>
<set
name="userPreferences"
inverse="true"
order-by="preference asc"
fetch="join">
<key column="user" />
<one-to-many
class="it.innove.indesk.entities.IUserPreference"/>
</set>
</joined-subclass>
</class>
</hibernate-mapping>