That sounds like exactly what I want, but I am having a hard time 
understanding exactly how to register my IUserType implementation.

The things I am doing that seem relevant are:
1. When I call ModelMapper.AddMappings(), the set of mapped types includes 
the pricing strategy class (but not its subclasses)
2. My IsEntity and IsRootEntity handlers return false for the pricing 
strategy class and subclasses.
3. My BeforeMapProperty handler looks for any properties where 
typeof(PricingStrategy).IsAssignableFrom(thePropertyType) and calls 
IPropertyMapper.Type<PricingStrategyUserType>()

Unfortunately, the call to IPropertyMapper.Type<PricingStrategyUserType>() 
point 3 never happens. It appears the the Product.PricingStrategy property 
is being processed as a many to once, since I do hit a break point set in 
the handler for BeforeMapManyToOne that is set to only break 
if typeof(PricingStrategy).IsAssignableFrom(thePropertyType).

I feel like I am making some kind of bone headed mistake, but can't put my 
finger on what it is right now.

- Chris B

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/S9Y5a2VgJ5sJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to