0

I'm trying to specify a composite key, in which one key is an identifier and another is not, using fluent nhibernate. Is it possible in fluent? If yes, what I'm doing wrong in below mapping?

public void Override(AutoMapping<AppUser> mapping)
{
    mapping.Table("AppUser");
    mapping.Id(x => x.Id, "RowID");
    mapping.CompositeId().KeyProperty(x => x.Id, "RowId")
        .KeyProperty(x => x.ServerID);
}
Varghese
  • 3
  • 2

1 Answers1

0

There is a free tool that can help generate the mappings http://nmg.codeplex.com

Also this blog is a great reference guide http://referencenotherdev.blogspot.co.uk/2012/02/nhibernates-mapping-by-code-summary.html?m=1

You are basically there, you need to remove the id mapping line.

sca_tone
  • 200
  • 7