Hi all.
I have 3 simple tables: User_Profile, Group_Profile, Group_Membership.
Table User_Profile
--> [PK] User_ID
Table Group_Profile
--> [PK] Group_ID
Table Group_Membership
--> [PK] Group_ID
--> [PK] Group_ID
I have mapping for the table Group_Membership:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="GroupMembership, businesslayer" table="group_membership" lazy="false">
<composite-id name="Id" class="GroupMembershipKey, businesslayer">
<key-property name="User" column="user_uid" />
<key-property name="Group" column="group_id" />
</composite-id>
</class>
</hibernate-mapping>
All i want is to have in class GroupMembership two public properties: Group and User, which return corresponging mapping objects. But when i had tried uncomment sections <many-to-one>, i got mapping error.
Also, i what to use find criteria for getting all groups in which user register.
Please, help me to solve this problem.