Hi, banging my head here and thought that some one out there might be able to help. Have Tables below.
Bucket(
bucketId smallint (PK)
name varchar(50)
)
BucketUser(
UserId varchar(10) (PK)
bucketId smallint (PK)
)
The composite key is not the problem thats ok I know how to get around this but I want my bucket class to contanin a IList of BucketUser. I read the online reference and thought that I had cracked it but havent. The two mappings are below
-- bucket --
<id name="BucketId" column="BucketId" type="Int16" unsaved-value="0">
<generator class="native"/>
</id>
<property column="BucketName" type="String" name="BucketName"/>
<bag name="Users" table="BucketUser" inverse="true" generic="true" lazy="true">
<key>
<column name="BucketId" sql-type="smallint"/>
<column name="UserId" sql-type="varchar"/>
</key>
<one-to-many class="Bucket,Impact.Dice.Core" not-found="ignore"/>
</bag>
-- bucketUser --