Fetching several objects at a time

Author Message

Leif Arne Storset

Friday 02 June 2006 7:45:13 am

Is it possible to fetch several objects in one operation?

I have a list of object IDs, and need to fetch all of the corresponding objects. I'm thinking that iterating through the list, fetching each one separately, is woefully inefficient, with one SQL query for each iteration.

It would be theoretically possible (in the general case) to fetch multiple objects in one query using the OR operator in SQL, but I'm not sure whether eZ publish's structure allows this, not to mention its template API.

And before you ask, no, I am not trying to fetch children of multiple nodes (fetch ( 'content', 'list' )) - I want the objects themselves, not their node children. :)

Leif Arne Storset

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.