|
Using NHIbernate -- Joseph Guadagno --
Has any one used NHibernate objects with AjaxPro? I am trying to change my Contacts example to use NHibernate but I am getting a lazy load exception being returned. It is my understanding that NHibernate does not fetch the data for child objects until the data is requested as a result when the Ajax library tries to read any child objects to create the JSON string the NHibernate library returns a Lazy Initialization error because there is no associated Session with the object. Thanks, Joseph Guadagno http://josephguadagno.net |
|
-- Jon Ceanfaglione --
i have used it extensively in my projects. i can look at some code if you like. On 7/6/06, Joseph Guadagno Has any one used NHibernate objects with AjaxPro? I am trying to change my Contacts example to use NHibernate but I am getting a lazy load exception being returned. It is my understanding that NHibernate does not fetch the data for child objects until the data is requested as a result when the Ajax library tries to read any child objects to create the JSON string the NHibernate library returns a Lazy Initialization error because there is no associated Session with the object. Thanks, Joseph Guadagno http://josephguadagno.net > |
|
-- Joseph Guadagno --
Thanks. I will have send the code in a little bit. I can not send attachments > 2 meg from work. Joseph Guadagno http://josephguadagno.net |
|
-- Jon Ceanfaglione --
Joseph Where is the lazy load exception coming from? Can you show me the whole stacktrace? On 7/6/06, Joseph Guadagno Thanks. I will have send the code in a little bit. I can not send attachments > 2 meg from work. Joseph Guadagno http://josephguadagno.net > |
|
-- Joseph Guadagno --
The best I can tell, without having the code in front of me is from AjaxPro.NET, in the Sample1_GetContactCallback.aspx, there is a ReturnClass method which populates the Contact and Team class but when in the JavaScrip function GetContact_Callback the response has an error in it. On 7/7/06, Jon Ceanfaglione Joseph Where is the lazy load exception coming from? Can you show me the whole stacktrace? On 7/6/06, Joseph Guadagno < jguadagno> wrote: > > Thanks. I will have send the code in a little bit. I can not send > attachments > 2 meg from work. > > Joseph Guadagno > http://josephguadagno.net > > > > > > > -- Joseph Guadagno http://josephguadagno.net |
|
-- Jon Ceanfaglione --
Joseph I was able to do some testing and setting lazy load to false allows AjaxPro to work fine with my objects. However, if lazy load is true AjaxPro causes all kinds of hell. On 7/7/06, Joseph Guadagno The best I can tell, without having the code in front of me is from AjaxPro.NET, in the Sample1_GetContactCallback.aspx, there is a ReturnClass method which populates the Contact and Team class but when in the JavaScrip function GetContact_Callback the response has an error in it. On 7/7/06, Jon Ceanfaglione > > Joseph > > Where is the lazy load exception coming from? Can you show me the whole > stacktrace? > > On 7/6/06, Joseph Guadagno < jguadagno > wrote: > > > > > Thanks. I will have send the code in a little bit. I can not send > > attachments > 2 meg from work. > > > > Joseph Guadagno > > http://josephguadagno.net > > > > > > > > > > > > -- Joseph Guadagno http://josephguadagno.net > |
|
-- Joseph Guadagno --
I kinda figured that. I am trying to avoid setting Lazy Loading to false. Joseph Guadagno http://josephguadagno.net |