CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • fetch entities with a list of id. Easy(ish) ?
Pages: [1]

Author Topic: fetch entities with a list of id. Easy(ish) ?  (Read 628 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
fetch entities with a list of id. Easy(ish) ?
September 05, 2011, 01:03:31 am
Hi,

I suspect that being able to use the api to fetch a list of entities when you know the ids is going to be a useful feature. Eg:

http://civicrm.org/blogs/lobo/introducing-hookcivicrmsearchcolumns-modify-search-results-meet-your-needs#new

Another example was to fetch the tags details of a entitytag.

So far, the "solution" is doing one request by id, works, but going to kill the server. It would be great if the API (well, the BAO/DAO under) could deal with both the id being an integer of an array of integers.

I did try to follow the code and got lost.

@civicore, how complicated would it be? Doable or changing so many things it's likely it's going to brake things?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: fetch entities with a list of id. Easy(ish) ?
September 05, 2011, 11:15:24 am
I think a general limitation of apiv3 is that it tends to deal with one object at a time. Not sure the answer....
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • fetch entities with a list of id. Easy(ish) ?

This forum was archived on 2017-11-26.