Derik Whittaker

Syndication

News


Lazy loading w/ NHibernate and Remoting do not play well

I know, call me captain obvious but today I spent some time trying to determine why i was receiving the following error:

{"Object of type 'System.Collections.Generic.List`1[AssignedMessageTypes]' cannot be converted to type 'Endpoint'."}

No I know that Lazy loading and remoting do not play well, in fact I actually have some unit tests around some repository calls to ensure that I have eagerly loaded my data.  However, I complete forgot to force eager loading on one call and paid the price.

If you ever come across an error like above and you are using remoting with Nhibernate, first thing I would check to see is that all my data is being eagerly loaded.

Hope this helps,

Till next time,


Posted 03-26-2009 9:08 AM by Derik Whittaker
Filed under:

[Advertisement]

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)