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