Skip to content

Instantly share code, notes, and snippets.

@orhanveli
Created November 20, 2011 09:12
Show Gist options
  • Save orhanveli/1380049 to your computer and use it in GitHub Desktop.
Save orhanveli/1380049 to your computer and use it in GitHub Desktop.
fluent nhiberante guid mapping
public TagMap()
{
Table("general_tags");
#region EntityBase
//Id(x => x.Id, "tagId").GeneratedBy.HiLo("nhibernate_hilo", "tag_NextHi", "5");
Id(x => x.Id, "tagId").GeneratedBy.Guid();
Map(x => x.IsDeleted, "isDeleted").CustomType(typeof(bool));
#endregion
Map(x => x.Tag, "tag");
Map(x => x.UrlName, "urlName");
HasMany(x => x.TagRelations).Table("general_content_tags").KeyColumn("tagId");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment