LLBLGen: Lazy loading, Caching and Query based search

Posts   
 
    
IndrajeetP
User
Posts: 8
Joined: 21-Sep-2006
# Posted on: 21-Sep-2006 16:21:29   

Hi all,

First of all, congrats to the LLBLGen team for coming up with such a nice product.simple_smile

Background: My project shall have Remoting and Web Services (actually quite a lot). Hence, as per recommendations in the LLBLGen documentation, we shall have to use the adapter pattern.

Problem: As far as I know, in LLBLGen,

  • When you use adapter pattern, lazy loading is not supported.
  • Caching is not supported
  • Query based search is not supported

These are some of the most important criteria/features (and if I am not wrong, these features are supported in nHibernate) for the selection of ORM for my project.

I would be grateful if anybody could throw some light on the above mentioned 3 things and let me know if there are any solutions(or workarounds) for each of these (especially the Lazy Loading one) in LLBLGen.

I hope to get some comprehensive replies at the earliest. simple_smile

Thanks!

Regards, Indrajeet

Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 21-Sep-2006 17:26:37   

When you use adapter pattern, lazy loading is not supported. Caching is not supported Query based search is not supported

I am assuming you will be using single call remoting?

The first one you are correct on. But i cant really see WHY you would want lazy loading when building a service..using prefetch paths i load all data i need upfront, workout on it, and send it out...

Caching is not supported, but in the case of using remoting and webservices (if your using single call) i dont think the builtin caching of nhibernate will work either. I assume your going to host your remoting layer in IIS? then use the asp.net caching system to cache your entities.

And finally, llblgen doesnt use a HQL type text search if thats what you mean. You can certainly build a query using a predicates etc... then send them over remoting to your service, i do it right now simple_smile

mikeg22
User
Posts: 411
Joined: 30-Jun-2005
# Posted on: 21-Sep-2006 22:23:52   

We use adapter and sometimes not having lazy loading is a pain. For example, when a user creates a new entity, it would be nice to sometimes have the related entities fetched when the foreign keys on the new entity change. Right now we have to hardcode these related entity fetches, which leads to maintenance problems (like when a new relation is added, sometimes we forget to go into the code and hardcode the associated fetch).

IndrajeetP
User
Posts: 8
Joined: 21-Sep-2006
# Posted on: 26-Sep-2006 07:16:33   

Answer,

Thanks for your response. simple_smile (...and Sorry for the late reply from me).

Regards, Indrajeet