fluent-nhibernate
fluent-nhibernate copied to clipboard
Fluent NHibernate!
Example project: https://github.com/vbprogr/nhmapinheritancebug.git
See: http://stackoverflow.com/questions/11051515/fluentnhibernate-doubles-columnname-when-using-icomponentconvention-maps-v1-3-0 This works in v.717 (IComponentConvention) : ``` csharp public void Apply(IComponentInstance instance) { if (instance.Type == typeof(EmailAddress)) { instance.Properties.First(property => property.Name == "FullAddress")).Column(instance.Name); } } ``` Using the...
Using an `IHasManyConvention` convention as follows, I can almost generate the correct mapping. However, I can't remove the `one-to-many` element. ``` instance.AsSet(); var tableName = Inflector.Inflector.Pluralize(instance.EntityType.Name + instance.Member.Name); instance.Table(tableName); instance.Key.Column(instance.EntityType.Name...
When nesting Components, the ColumnPrefix is only applied to the first nested Component. Example Mapping follows: ClassMap ``` Component(x => x.Invoice).ColumnPrefix("Invoice"); ``` and ``` public class InvoiceMap : ComponentMap {...
The short conventions DynamicInsert/Update.AlwaysTrue/False only apply to classes. They should also apply to subclasses and joined-subclasses.
The table name that's generated by the automapper for element collections is the property name of the collection. If different entities use the same collection name then there'll be conflicts....
In version 1.1, I designed classes deriving from MapClass and SubmapClass to handle default behaviours in my class library. Among other things, this implied to override protected methods such as...
Given the following domain model and mappings: ``` public class Order { public virtual Guid Id { get; set; } public virtual ICollection LineItems { get; set; } } public...
I've got the following PersistenceSpecification: ``` c# new PersistenceSpecification(session) .CheckProperty(c => c.Name, "Testing") .CheckProperty(c => c.Address.Address1, "Address 1") .CheckProperty(c => c.Address.Address2, "Address 2") .CheckProperty(c => c.Address.Address3, "Address 3") .VerifyTheMappings(); ```...
After Upgrading from FNH 1.2 to 1.3 my project threw some runtime exceptions. It turned out that fnh 1.3 tries to map a private nested class. Is this intended behaviour...