|
using using NHib 1.2 CR1 / .Net2.0
Ok, lets say i have an interface
IInventoryItem, and have wired up all my base fields for it.
joined-subclass works great when i have more properties.
However, now I want to create a Basic IInventoryItem which is just a concrete version of IInventoryItem.
so I build my class file, inherit the interface, and NHib complains that there is no explicit map for it. Fine, that's understandable.
However, I attempt to create a map for it, with join-subclass, even though there isn't a real join happening) and it spits out the nasty join syntax on the sql query even though i leave out the table name.
So I try using just plain old subclass. However this fails to work as well, because unless I am missing something, i can't have multiple types of inheritance. I cannot mix subclass and join-subclass.
At least my attempts to use mixed failed because i used a discriminator for the subclass, but not the join-subclass- it did not like that at all.
Am I missing something, or is my only choice to abandon the interface pattern and use abstract base classes instead?
|