Hmmm..... are there any examples out there for this scenario?
If not, can you sketch how it might be achieved because there are some
details that I'm fuzzy on.
If one uses IUserType I won't be able to query
on the properties and so suppose I implement ICompositeUserType
for the ValueObject PaymentMethod to be used like this
class Subscription {
public PaymentMethod PaymentMethod { get; set; }
}
class PaymentMethod
class CreditCard : PaymentMethod
class ECheck : PaymentMethod
so a given subcription I would like the correct type of
instance to be returned. (e.g.CreditCard or an ECheck)
and when I query.
One of the details I'm confused about is based on my understanding
would I have to, in the property mapping, list all the columns
involved in mapping
each class e.g.
<property name="" class="PaymentMethodCustomType>
<column name="CardNumber"/>
<column name="Expiration"/>
<column name="CSC"/>
.....
<column name="CheckAccountNumber"/>
<column name="RoutingNumber"/>
.....
</property>
and in the GetProperties Method I would list all of the Properties in
every class?
Is that right?
Lastly, this seems like a straight forward use case for mapping, but
not obvious
as to how to map the model. Why? Perhaps this should be a feature or
maybe
the difficulty is telling me my modeling is off. If so, does anyone
have any insights?
Cheers,
Aeden
> > Aeden- Hide quoted text -
>
> - Show quoted text -