Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-18295

API Basic Get ignores entity definition

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.7, 4.7.1, 4.7.2, 4.7.3, 4.7.4
    • Fix Version/s: None
    • Component/s: CiviCRM API
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      Running a _civicrm_api3_basic_get() on an entity where the key and column name do not match fails. Values passed in via params are lost when SelectQuery->run() builds the where clause. The problem is in two parts:
      _civicrm_api3_field_names (Utils:471) returns a numerically indexed array instead of maintaining the key hashes.
      SelectQuery->run:229 Only checks to see if a param name matches a column name, rather than doing any sort of lookup, by default this wouldn't work because the entityFieldNames only contains the database column names.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tobiaslounsbury Tobias Lounsbury
                Reporter:
                tobiaslounsbury Tobias Lounsbury
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: