A test case would be perfect for us to understan the problem.

Tuna Toksöz
Eternal sunshine of the open source mind.

http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike




On Sat, Apr 18, 2009 at 2:12 PM, LosManos <[email protected]> wrote:

>
> hejdig.
>
> Thanks.
>
> Do you know then, on the top of your head, what could throw up an
> error message like "...Proxy1 cannot be serialized because it does not
> have a parameterless constructor."?  Or point me in a direction?
>
> TIA
>
> /OF
>
>
> On 14 Apr, 15:34, Fabio Maulo <[email protected]> wrote:
> > The proxy is serializable.
> >
> > 2009/4/14 LosManos <[email protected]>
> >
> >
> >
> >
> >
> >
> >
> > > hejdig.
> >
> > > I have an HNhibernate object with a foreign key that sometimes is
> > > null.
> > > I serialize through web services.
> >
> > > When I have lazy=false it works alright but with lazy= true I get a
> > > "Proxy1 cannot be serialized because it does not have a parameterless
> > > constructor."
> >
> > > I get that the automagically created proxy doesn't have a default
> > > constructor and that the idea of having a proxy is to "catch the call"
> > > for the foreign key and create an object on the fly.  This works nice
> > > on the server.
> >
> > > But when we serialize this doesn't work...
> >
> > > One solution is to sub class and make sure the each class doesn't have
> > > a foreign key that can be null; but with 4 foreign keys this makes 16
> > > possibilities and a not very good work around.
> > > My connections with Hibernate experience does not recognize this
> > > problem.
> >
> > > What is the "correct" solution?
> >
> > > TIA
> >
> > > /OF
> >
> > --
> > Fabio Maulo
> >
>

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