Fluent Nhibernate AutoMapping Inheritance and Ignoring an Abstract Property -


i have inheritance structure have succesfully mapped

product (base)

pdfproduct (inherits product) & otherproduct(inherits product)

these working fine , have done simmilar thing before hmb.xml files.

in previous project had problem when trying find out type product couldnt proxy (product pdfprodcut).

to solve this, added abstract property base product , overrided in other classes returning enumerator.

when did xml mappings didnt map type column , well.

now trying auto map inherited relationship, automatically maps abstract property child classes, not needed isnt in database.

any ideas how tell ignore these? child relationships dont mapping generated im not sure put ignore statement.

any greatfully received.

fluent nhibernate has ignore proprty method can use in setup:

.fortypesthatderivefrom<product>(p => p.ignoreproperty(x => x.type)) 

by way, solved problem adding self property base class. property return correct (non-proxy) type:

    public virtual product self     {         { return this; }     } 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -