Hi there

Just noticed a somewhat weird issue. When I'm transforming my queried
object to another type, the target type must have a public
constructor. Why is that?

I normally use small DTO's for lists etc. and don't want to expose a
public constructor on these kind of objects, as they only serve as
binding objects for the interface and therefore shouldn't be able to
be constructed outside that scope.

Looking at the NH source I came across this in
AliasToBeanTransformer.TransformTuple:

result = Activator.CreateInstance(this.resultClass);

This calls the activator and tells it to only create instances with
public constructors (nonPublic = false). Seems a bit strange to me...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
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