I’m trying to do a map which I don’t know if is supported in NHibernate.
I have a table A for which I have a mapping in Fluent NHibernate.
I have another table called B in which I have to search for A.Id . If I find this Id in this table than I have to set a bool property in the mapping for class A to true, otherwise to false.
Between table A and table B there is a one to one relationship represented in the mapping with a HasOne method.
The trouble is that HasOne don’t have a CustomType method that I can use to convert the result to a bool property.
I would also be fine with casting the value to a bit or int from the mapping but I don’t know how to do that.
Does anyone know if this is possible and if yes how can be done ?
Thank you, Mosu.
Formula is made for such a scenario
Edit:
another approach (not tested)