On Dec 18, 10:44 pm, sbohlen <[email protected]> wrote:
> 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

Thanks, that works, but what if I need to have mandatory fields in my
class? Is there a way around that?

-- 
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