Hi All

I can't figure out how to make my Id column name override the auto
map, although everything else looks fine. My FluentHib dll is version
0.1.0.0. Can someone spot what I need to do to fix this?

Thx,
Berryl

/--------Override class: ------/
public class LegacyProjectMap : IAutoMappingOverride<LegacyProject>
    {
        public void Override(AutoMap<LegacyProject> mapping) {
            mapping.WithTable("Projects");
            mapping.Id(x => x.Id).ColumnName("[#]") <<====== what the
legacy db file column name is
.WithUnsavedValue("UNASSIGNED").GeneratedBy.Assigned();
...
        }
    }

/---------AutoPersistenceModel setup (based on SharpArch / Northwind)
-----------/
        public AutoPersistenceModel Generate() {
            return AutoPersistenceModel
 ...
                .WithSetup(GetSetup())
...
        }

        private static Action<AutoMappingExpressions> GetSetup() {
            return c =>
            {
                c.FindIdentity = type => type.Name == "Id";
                c.IsBaseType = IsBaseTypeConvention;
                c.IsComponentType = type => type.IsSubclassOf(typeof
(ValueObject));
            };
        }

/---------- Generated hbm: -------------/
  <class name="LegacyProject" table="LegacyProjects"
xmlns="urn:nhibernate-mapping-2.2">
    <id name="Id" type="String" unsaved-value="UNASSIGNED"
column="LegacyProjectID">
      <generator class="assigned" />
    </id>
    <property name="Description" type="String">
      <column name="NAME" />
    </property>
    <property name="Status" type="String">
      <column name="STATUS" />
    </property>
  </class>
</hibernate-mapping>
--~--~---------~--~----~------------~-------~--~----~
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