The exception message is actually pretty clear here: you need to have
either a protected or public no-arg ctor for your Market class. This is so
that the NH proxy infrastructure that support lazy-loading, etc. has a
known way to create a subclass of your persistent entity and override
collection-initializing for lazy-loading support.
Since your Market class has a ctor that takes several args, the compiler is
no longer able (willing!) to create the default no-arg ctor for the class.
Add either of the following lines to your Market class and it should work:
public Market () { } //public zero-arg ctor
protected Market() { } //protected zero-arg ctor
-Steve 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/-/UX4o4O8jxScJ.
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.