In our SOA application we have several customers' data in the same database and in the same tables.
To control access, we have a column that describes this relationship. This column isn't represented in the domain model, however. I know about query only properties - so, for querying - it is working perfectly.
However, how do I write to this column when saving new rows/entities?
Code:
public class Customer
{
public virtual long Id{get;private set;}
public virtual string AccountNumber{get;set;}
}
Mapping:
<class Name="Customer">
<id name="Id">
<generator class="native"/>
</id>
<property name="AccountNumber"/>
<property name="Partition" access="noop" not-null="true"/>
</class>