Fluent NHibernate Mapping not on PK Field -


I have the following applause and their structure can not be edited ...

 < Code> person - ---- id pk code name sequence ----- id pk person command order order details  

Now in my person category I have to make a list of orders for that person , But I want to know exactly how to set the mapping in Fluent Nhibernate to match on the code column instead of id Not is not a foreign key constraint and I can not change the database to use the keys. There is something I want, but unable to understand the mapping. Public class person {public virtual id id (get; set;} public virtual string code {get; set;} public virtual eilist & lt; order & gt; order {receiving; private} Set;}} public class command {public virtual id id (get; set;} public virtual string order delivery {received; set;} public virtual person owner {received; set;}}

KeyColumn is defined by the method, it should work regardless of the existence of a foreign key constraint.

  class personmap: classpace & lt; person & gt; {public manmap (HasMany The property reef ("code");}}  

is available from the property method so that you can get the fluent nhibernate version (p = & gt; p.Order). Needs to be updated.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -