Change column for joined class mapping in Fluent NHibernate Automapping -
i have inheritance
public abstract class userentity : entity { public virtual int id { get; protected set; } } public class employee : userentity { public virtual string email { get; set; } }
entity standard nh class overridden methods equals, gethashcode, etc. , use autmap rewriting .includebase()
i got fluent nhibernate automapping
<class xmlns="urn:nhibernate-mapping-2.2" name="dto.entities.userentity" table="userentities"> <id name="id" type="system.int32"> <column name="id" /> <generator class="identity" /> </id> <joined-subclass name="dto.entities.employee" table="employees"> <key foreign-key="fk_employee_userentity"> <column name="userentityid" /> </key> <property name="email" type="system.string"> <column name="email" /> </property> </joined-subclass> </class>
i want change name key column in joined subclass userentityid employeeid
i try
public class userentityoverride : iautomappingoverride<userentity> { public void override(automapping<userentity> mapping) { mapping.joinedsubclass<employee>("employeeid"); } }
but didn't have success.
i use latest moment fnh nuget package: fluentnhibernate 1.2.0.712. have more configuration , conventions can somehow affect on configuration ignoring, have tried on clear solution same negative result.
Comments
Post a Comment