The last I looked at the SA project, you shouldn't need to explicitly
specify your Id field, inheriting from Entity implements it (maybe
that's changed).


After creating the Override, are you adding it into your AutoMappings
builder?


Example, with the override like:



public class TestObjectOverride : IAutoMappingOverride<TestObject>
{
public void Override(AutoMapping<TestObject> mapping)
{
mapping.Id(x => x.Id).Column("My_Vendor_ISN");
}
}


and a Mappings implementation of:



.Mappings(m => m
.AutoMappings.Add(AutoMap.AssemblyOf<TestObject>()
.UseOverridesFromAssemblyOf<TestObjectOverride>())


It results in the HBM having the set column name:



<id name="Id" type="System.Int32, mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089">
<column name="My_Vendor_ISN" />
<generator class="identity" />
</id>


This is using the latest commit from Sharp Architecture repo
(https://github.com/codai/Sharp-Architecture).

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to