Forums / Setup & design / Fetching several objects at a time

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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 Exponential'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