So as usual I have an issue with ria service + nhibernate. The question is how to make an entity property , mapped using “references”, visible on the client side. The problem is that when you load an entity without this field and try to save it , then missing values are updated as NULL inside db. Here’s class schema:
public class A
{
public virtual ComplexProperty property {get;set;}
}
public class AMap
{
public AMAP()
{
References(p=>p.property).Nullable().Column(“COMPLEX_PROPERTY_ID”);
}
}
(I've skipped parts with mapping/declaring key property as it's made inside underlying classes) Usual trick with include and association attribute(like with HasMany) does not work as there is no real foreign_key property inside class A