Body: <p>I just noticed an error on a site I maintain.
  Some custom code uses apiv4 to return a value from a set of custom fields (on individual contacts) and that function now throws an error:</p>
  <pre><code>API_Exception: Invalid field 'Employment_History.relationshipID' in Civi\Api4\Query\Api4SelectQuery-&gt;getField() (line 474 of /var/www/html/sitename/sites/all/modules/contrib/civicrm/Civi/Api4/Query/Api4SelectQuery.php).
  </code></pre>
  <p>Doing some tests, it seems that sometime between 5.15.1 and 5.27.4 (issue still exists in current version, 5.28.2) apiv4 stopped being able to return custom fields that can have multiple values.</p>
  <p>I tested this by creating two sets of fields that are identical other than one being set to allow multiple entries. Only one shows up in the apiv4 explorer.</p>
  <p>I'm going to update the working site to isolate the version where the problem started.</p>
  <p><a href="https://i.sstatic.net/UGW7X.png" rel="nofollow noreferrer">apiv4 explorer 5.15.1</a></p>
  <p><a href="https://i.sstatic.net/b3AAC.png" rel="nofollow noreferrer">apiv4 explorer 5.27.4</a><a href="https://i.sstatic.net/b3AAC.png" rel="nofollow noreferrer">2</a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-20T19:06:01.070Z
Comments.Text: I remember something about a "serializable" concept being introduced probably in that range but I would have thought there was something that updated the config for those fields as part of the upgrade. If you resave the custom field definition does that fix it? What type of field is it?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-20T19:08:16.800Z
Comments.Text: [This PR](https://github.com/civicrm/civicrm-core/pull/16992) and here's the upgrade line: https://github.com/civicrm/civicrm-core/pull/16992/files#diff-8c640d60161e4a5cb75c877d354fdc57
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-20T19:19:22.843Z
Comments.Text: even if I create new fields this problem happens. create new fieldset that is single entry and it works; add a new fieldset that is multiple entry it will not be available in the api explorer and will throw the error noted.
Comments.UserDisplayName: ericG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-20T19:29:50.507Z
Comments.Text: looks like it started with 5.22.0
Comments.UserDisplayName: ericG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-20T20:13:28.760Z
Comments.Text: tested this on multiple sites, including one of the civi demo sites. 
  
  multiple entry sets are no longer identified by apiv4 
  
  https://demo.circle-interactive.co.uk/civicrm/api4#/explorer/Contact/get
  
  (there's a test single and test multiple set; only one shows)
Comments.UserDisplayName: ericG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-20T20:14:32.823Z
Comments.Text: oh, forgot to mention. Drupal 7.x
Comments.UserDisplayName: ericG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-20T20:19:50.903Z
Comments.Text: same under wordpress https://demo.tadpole.cc/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fapi4#/explorer/Contact/get 
  
  okay. now to dig into what changed in 5.22
Comments.UserDisplayName: ericG
Tags: <apiv4>
Title: apiv4 no longer sees custom fields that allow for multiple entry
ThreadText: # apiv4 no longer sees custom fields that allow for multiple entry
  
  (Asked by: username_0 on 2020-08-20)
  
  I just noticed an error on a site I maintain.
  Some custom code uses apiv4 to return a value from a set of custom fields (on individual contacts) and that function now throws an error:
  API_Exception: Invalid field 'Employment_History.relationshipID' in Civi\Api4\Query\Api4SelectQuery->getField() (line 474 of /var/www/html/sitename/sites/all/modules/contrib/civicrm/Civi/Api4/Query/Api4SelectQuery.php).
  
  Doing some tests, it seems that sometime between 5.15.1 and 5.27.4 (issue still exists in current version, 5.28.2) apiv4 stopped being able to return custom fields that can have multiple values.
  I tested this by creating two sets of fields that are identical other than one being set to allow multiple entries. Only one shows up in the apiv4 explorer.
  I'm going to update the working site to isolate the version where the problem started.
  apiv4 explorer 5.15.1
  apiv4 explorer 5.27.42
  
  **Tags:** apiv4
  
  > **Comments:**
  > **username_1**: I remember something about a "serializable" concept being introduced probably in that range but I would have thought there was something that updated the config for those fields as part of the upgrade. If you resave the custom field definition does that fix it? What type of field is it?  
  > **username_1**: [This PR](https://github.com/civicrm/civicrm-core/pull/16992) and here's the upgrade line: https://github.com/civicrm/civicrm-core/pull/16992/files#diff-8c640d60161e4a5cb75c877d354fdc57  
  > **username_0**: even if I create new fields this problem happens. create new fieldset that is single entry and it works; add a new fieldset that is multiple entry it will not be available in the api explorer and will throw the error noted.  
  > **username_0**: looks like it started with 5.22.0  
  > **username_0**: tested this on multiple sites, including one of the civi demo sites.   multiple entry sets are no longer identified by apiv4   https://demo.circle-interactive.co.uk/civicrm/api4#/explorer/Contact/get  (there's a test single and test multiple set; only one shows)  
  > **username_0**: oh, forgot to mention. Drupal 7.x  
  > **username_0**: same under wordpress https://demo.tadpole.cc/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fapi4#/explorer/Contact/get   okay. now to dig into what changed in 5.22  
  
  ---
  
  ## 0 answers
  
  