forked from WCell/WCell
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request WCell#59 from Shyax/fluenthibernate
First attempt to convert PetitionRecord to fluent, will work however includes some changes not required -- will refactor later
- Loading branch information
Showing
3 changed files
with
42 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
Services/WCell.RealmServer/Database/Mappings/PetitionRecordMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using FluentNHibernate.Mapping; | ||
using WCell.RealmServer.Items; | ||
|
||
namespace WCell.RealmServer.Database.Mappings | ||
{ | ||
internal class PetitionRecordMap : ClassMap<PetitionRecord> | ||
{ | ||
public PetitionRecordMap() | ||
{ | ||
Id(x => x.OwnerId); | ||
Map(x => x.Type).Not.Nullable(); | ||
Map(x => x.ItemId).Not.Nullable(); | ||
Map(x => x.Name).Not.Nullable().Unique(); | ||
HasMany(x => x.SignedIds).Element("SignedIds"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters