Is it possible to map one column twice using NHibernate?
<property name="CustomerID" index="IX_Customer" not-null="true" />
<many-to-one name="Customer" column="customerid" class="Customer" fetch="join" />
I need to have the raw ID in order to bind a WinForms control which only supports Binding using a value (instead of the Item itself).
myControl.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", bs, "CustomerID", true));
Yes, just modify
<property name="CustomerID" index="IX_Customer" insert="false" update="false" not-null="true" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With