Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

delayedfetch / fetch object in 1 query

0 views
Skip to first unread message

Philip

unread,
Aug 1, 2008, 9:39:17 AM8/1/08
to
I have a class in model with a blob field, I have set DelayedFetch to
true.

Most of the time I don't need the blob field which is why I have set
DelayedFetch to true.

However there are circumstances where I do need the blob.

My current understanding would be if I did an oclPS I would get the
object ID, then if I did an ensureRange I would get the data (Except
the delayedfetch field)

When I accessed the field I would get another sql query that would
fetch the blob.

How could I fetch the DelayedFetch field in as little queries as
possible? (ideally ids, and all data in one DB query)

Thanks for all your help guys,
hope you dont mind all my questions today!

Peter Morris

unread,
Aug 1, 2008, 10:34:00 AM8/1/08
to
If you use your list as the context for an in-memory IOclService evaluation
it will load them efficiently.

EcoSpace.Ocl.Evaluate(objs, "self.DelayFetchedAttribute);

Pete

Philip

unread,
Aug 1, 2008, 10:40:14 AM8/1/08
to

Thank you Pete

0 new messages