Skip to content

Instantly share code, notes, and snippets.

@skoon
Created March 16, 2011 18:57
Show Gist options
  • Save skoon/873078 to your computer and use it in GitHub Desktop.
Save skoon/873078 to your computer and use it in GitHub Desktop.
When I try to save an entity using this mapping, I'm told that the CompositeId class must override "Equals". Which seems like a pain.
public class PageKeywordMappings : ClassMap<ScrewturnPageKeyword>
{
public PageKeywordMappings()
{
Table("PageKeyword");
CompositeId()
.KeyProperty(m => m.Page)
.KeyReference(m => m.Keyword)
.KeyReference(m => m.Namespace);
Map(m => m.Namespace);
Map(m => m.Revision);
Map(m => m.Keyword);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment