OnFetch() method when usingUC

Posts   
 
    
honzas
User
Posts: 1
Joined: 20-Jun-2006
# Posted on: 20-Jun-2006 12:25:04   

Is there some reason not to generate call of OnFetch() and OnFetchComplete() methods into FetchUsingUCxxx() methods?

I am able to add the method calls to the entityInclude.template but it is not so clear and maybe I am breaking some design concept...?

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 21-Jun-2006 00:49:19   

I believe that OnFetch and OnFetchComplete are used for multi row fetches and not single row fetches. OnFetchEntity and OnFetchEntityComplete are used for single row fetches.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 21-Jun-2006 12:26:11   

Ok, couple of issues: 1) you're correct, the UC fetch doesn't call OnFetch and OnFetchComplete. That's a bug. 2) in multi-row fetches, OnFetchComplete is called but not OnFetch. Also a bug. it must be my lucky day disappointed

issue 1 is a template issue, The fetch routine for UC fetches has to receive the try/finally block as Fetch() has. issue 2 is a runtime lib issue.

(edit). Fixing 2 is not doable, as in a multi-entity fetch, an entity is created together with fetched fields, so it's never the same situation as with Fetch(), which calls OnFetch when the entity is empty. -> not fixed.

Issue 1) is addressed in next build (via a template fix).

Frans Bouma | Lead developer LLBLGen Pro