Lazy loading for Blob type entity fields

Posts   
 
    
SyN
User
Posts: 5
Joined: 10-Jan-2006
# Posted on: 10-Jan-2006 14:30:46   

Hi,

I am currently evaluating LLBLGen Pro demo using the selfservicing template for Visual Studio 2005 and an Oracle database.

I would like to know if there is a way to delay the fetching of BLOB type entity fields until such a field is actually accessed via the matching (readonly) property of th entity (i.e. I would like to transparently lazy load the BLOB field to avoid hogging memory and bandwith resources just as LLBLGen allows me to do with 1:1 relationships).

Thank you in advance.

Sincerely, Jean.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 10-Jan-2006 14:39:17   

This is currently not possible, but it's planned for v2 which is scheduled for late Q1 2006

Frans Bouma | Lead developer LLBLGen Pro
SyN
User
Posts: 5
Joined: 10-Jan-2006
# Posted on: 10-Jan-2006 14:41:18   

Thank you for this quick reply.

I guess I will just unmap the BLOB field from the entity and fetch the BLOB manually with good old SQL then.

Sincerely, Jean.

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 10-Jan-2006 14:51:23   

I faced this need before, so I designed my database in a way to put my BLOB fields in another table having 1:1 relation with the main table so that it would be loaded only on demand.

RobinT
User
Posts: 6
Joined: 04-Jun-2007
# Posted on: 19-Jun-2007 18:00:23   

I have the exact same problem, but I dont feel like splitting up the table. Has this been implemented yet? If so, how do I mark a field as "lazy loadable" (could not find it in the manual so far) ?

Thanks

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 20-Jun-2007 10:56:24   

RobinT wrote:

I have the exact same problem, but I dont feel like splitting up the table. Has this been implemented yet? If so, how do I mark a field as "lazy loadable" (could not find it in the manual so far) ?

Thanks

It has been implemented in v2.5, currently in beta. Please look into 'excluding fields' in the beta docs for v2.5.

Frans Bouma | Lead developer LLBLGen Pro
RobinT
User
Posts: 6
Joined: 04-Jun-2007
# Posted on: 20-Jun-2007 15:31:20   

Ok thanks I found it.

The docs only give an example for adapter though. I had look around for while for selfservicing, as only the very last version on GetMulti() turned out to have an entry for an exclusion list. Maybe add a slight update to the docs?

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 20-Jun-2007 15:53:47   

Thanks, will take this into consideration, as the documentation is still in beta too.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 20-Jun-2007 20:01:43   

Yes, the docs are very raw and will be updated soon. I had hoped to have proper docs in development already, as we purchased a license for Madcap Flare, but we ran into a major bug with that immediately, so we're currently a bit stalled in that progress. Hopefully it's fixed very quickly.

Frans Bouma | Lead developer LLBLGen Pro
RobinT
User
Posts: 6
Joined: 04-Jun-2007
# Posted on: 21-Jun-2007 11:45:41   

Another small suggestion for the final release might be to include the exclusion field in an other overloaded version of the GetMultiManyToOne() generated methods/templates. simple_smile

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 21-Jun-2007 12:16:51   

RobinT wrote:

Another small suggestion for the final release might be to include the exclusion field in an other overloaded version of the GetMultiManyToOne() generated methods/templates. simple_smile

These methods are more or less used for lazy loading routines. I've to think about adding an overload for these methods as well, as it will make the generated code bigger, which isn't something I'm really fond of doing.

Frans Bouma | Lead developer LLBLGen Pro
sparq
User
Posts: 63
Joined: 14-Mar-2010
# Posted on: 19-Feb-2018 22:27:07   

Otis wrote:

It has been implemented in v2.5, currently in beta. Please look into 'excluding fields' in the beta docs for v2.5.

I am using 5.3 and this feature doesn't seem to exist. "Excluding fields" does just that, it doesn't lazy load when calling the excluded property getter.

Did this get dropped at some point?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 20-Feb-2018 09:30:17   

Lazy loading excluded fields was never implemented as such, it's always been explicit (so you have to explicitly load the excluded fields. Here's why: https://www.llblgen.com/Documentation/5.3/LLBLGen%20Pro%20RTF/Using%20the%20generated%20code/SelfServicing/gencode_excludedfields.htm#the-excludeincludefieldslist-class (see note at the bottom of that paragraph)

Frans Bouma | Lead developer LLBLGen Pro