Fluent NHibernate Composite ID table problem
I'm kinda new to nhibernate and i ran into a problem.
I have the following tables:
Table 1:
Users
   ID
   Name

Table 2:
Missions
   ID
   Description

Table 3:
UserToDoMissions
   UserID
   MissionID
   Rank

Here is the code:
MissionMap:

    public class MissionMap : ClassMap<Mission>
	{
		public const string TableName = "tblMissions";
		public const string c_id = "achID";
		public const string c_name = "achName";

		public AchievmentMap()
		{
			Table(TableName);
			Id(x => x.ID).Column(c_id).Not.Nullable();
			Map(x => x.Name).Column(c_name).Not.Nullable();
			
			HasMany(x => x.UserToDoList).Cascade.All().Inverse().KeyColumn(UserToDoMap.c_missionID);
		}
	}

User Map:

    public class UserMap : ClassMap<User>
	{
		public const string TableName = "tblUsers";
		public const string c_id = "usrID";
		public const string c_userName = "usrUserName";

		public UserMap()
		{
			Table(TableName);
			Id(x => x.ID).Column(c_id).Not.Nullable();
			Map(x => x.UserName).Column(c_userName).UniqueKey(DBConsts.UniqueKeys.User_UserName).Not.Nullable();

			HasMany(x => x.UserToDoList).Cascade.All().Inverse().KeyColumn(UserToDoMap.c_userID);
		}
	}

UserToDo Map:

    public class UserToDoMap : ClassMap<UserToDo>
	{
		public const string TableName = "tblToDoList";
		public const string c_userID = "tdlUserID";
		public const string c_missionID = "tdlMissionID";
		public const string c_rank = "tdlRank";

		public UserToDoMap()
		{
			Table(TableName);
			CompositeId().KeyReference(x => x.User, c_userID).KeyReference(x => x.Achievment, c_missionID);
			References(x => x.User).Column(c_userID).Cascade.All().UniqueKey(DBConsts.UniqueKeys.ToDoList_UserRanks).Not.Nullable();
			References(x => x.Mission).Column(c_missionID).Cascade.All().Not.Nullable();
			Map(x => x.Rank).Column(c_rank).UniqueKey(DBConsts.UniqueKeys.ToDoList_UserRanks).Not.Nullable();
		}
	}

My problem is that i can;t save a new line. I can select and get all of the things but can't save.
Any ideas?

Thanks.
Fluent NHibernate Composite ID table problem
===

I'm kinda new to nhibernate and i ran into a problem.
I have the following tables:
Table 1:
Users
   ID
   Name

Table 2:
Missions
   ID
   Description

Table 3:
UserToDoMissions
   UserID
   MissionID
   Rank

Here is the code:
MissionMap:

    public class MissionMap : ClassMap<Mission>
	{
		public const string TableName = "tblMissions";
		public const string c_id = "achID";
		public const string c_name = "achName";

		public AchievmentMap()
		{
			Table(TableName);
			Id(x => x.ID).Column(c_id).Not.Nullable();
			Map(x => x.Name).Column(c_name).Not.Nullable();
			
			HasMany(x => x.UserToDoList).Cascade.All().Inverse().KeyColumn(UserToDoMap.c_missionID);
		}
	}

User Map:

    public class UserMap : ClassMap<User>
	{
		public const string TableName = "tblUsers";
		public const string c_id = "usrID";
		public const string c_userName = "usrUserName";

		public UserMap()
		{
			Table(TableName);
			Id(x => x.ID).Column(c_id).Not.Nullable();
			Map(x => x.UserName).Column(c_userName).UniqueKey(DBConsts.UniqueKeys.User_UserName).Not.Nullable();

			HasMany(x => x.UserToDoList).Cascade.All().Inverse().KeyColumn(UserToDoMap.c_userID);
		}
	}

UserToDo Map:

    public class UserToDoMap : ClassMap<UserToDo>
	{
		public const string TableName = "tblToDoList";
		public const string c_userID = "tdlUserID";
		public const string c_missionID = "tdlMissionID";
		public const string c_rank = "tdlRank";

		public UserToDoMap()
		{
			Table(TableName);
			CompositeId().KeyReference(x => x.User, c_userID).KeyReference(x => x.Achievment, c_missionID);
			References(x => x.User).Column(c_userID).Cascade.All().UniqueKey(DBConsts.UniqueKeys.ToDoList_UserRanks).Not.Nullable();
			References(x => x.Mission).Column(c_missionID).Cascade.All().Not.Nullable();
			Map(x => x.Rank).Column(c_rank).UniqueKey(DBConsts.UniqueKeys.ToDoList_UserRanks).Not.Nullable();
		}
	}

My problem is that i can;t save a new line. I can select and get all of the things but can't save.
Any ideas?

Thanks.