Prefetched Property Statuses

Posts   
 
    
joshmouch
User
Posts: 34
Joined: 02-Dec-2004
# Posted on: 13-Aug-2007 18:53:13   

It would be nice to know if a property on an entity has been prefetched, and if it has, which arguments where used to prefetch it. With this information, business logic could do something like the following:

1) Check if a property is prefetched. If it is not, either do so or throw an exception. 2) If it was, make sure that the filters used to prefetched it provide enough data for this use case. If not, prefetch additional data, or throw an exception.

Right now, as far as I know, the best you can do in the case of an x-to-1 property is to fetch it if it is currently null, and if you don't get any results then you know that it truly is null. For m-to-n properties, you always have to assume that it may not be the full collection. It could have not been fetched at all or it could have been fetched with a filter.

Is there already something in place for this that I don't know about. If not, do you have some code we could use to modify our code templates that would add this functionality.

As is, you just don't really know what the state of an entities' properties.

goose avatar
goose
User
Posts: 392
Joined: 06-Aug-2007
# Posted on: 13-Aug-2007 19:38:54   

Hi joshmouch, here is a thread related to your worry: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=2013

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Aug-2007 05:25:58   
David Elizondo | LLBLGen Support Team