Follow-up from #1857240: Figure out multi valued fields.

If there's more than one field with multiple results, only one of them is populated correctly.

CommentFileSizeAuthor
#1 efq_extra_field-2078421.patch642 bytesjonhattan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonhattan’s picture

Status: Active » Needs review
FileSize
642 bytes

Example sql results for a EFQ with two multivalued fields.

+-------------+-------------------------+-------------------------+
| entity_type | field_include_dates | field_exclude_dates |
+-------------+-------------------------+-------------------------+
| node        | 2013-09-10T00:00:00     | 2013-09-11T00:00:00     |
| node        | 2013-09-10T00:00:00     | 2013-08-14T00:00:00     |
| node        | 2013-09-10T00:00:00     | 2013-08-21T00:00:00     |
| node        | 2013-09-10T00:00:00     | 2013-08-28T00:00:00     |
| node        | 2013-08-13T00:00:00     | 2013-09-11T00:00:00     |
| node        | 2013-08-13T00:00:00     | 2013-08-14T00:00:00     |
| node        | 2013-08-13T00:00:00     | 2013-08-21T00:00:00     |
| node        | 2013-08-13T00:00:00     | 2013-08-28T00:00:00     |
| node        | 2013-08-20T00:00:00     | 2013-09-11T00:00:00     |
| node        | 2013-08-20T00:00:00     | 2013-08-14T00:00:00     |
| node        | 2013-08-20T00:00:00     | 2013-08-21T00:00:00     |
| node        | 2013-08-20T00:00:00     | 2013-08-28T00:00:00     |
| node        | 2013-08-27T00:00:00     | 2013-09-11T00:00:00     |
| node        | 2013-08-27T00:00:00     | 2013-08-14T00:00:00     |
| node        | 2013-08-27T00:00:00     | 2013-08-21T00:00:00     |
| node        | 2013-08-27T00:00:00     | 2013-08-28T00:00:00     |
| node        | 2013-08-29T00:00:00     | 2013-09-11T00:00:00     |
| node        | 2013-08-29T00:00:00     | 2013-08-14T00:00:00     |
| node        | 2013-08-29T00:00:00     | 2013-08-21T00:00:00     |
| node        | 2013-08-29T00:00:00     | 2013-08-28T00:00:00     |
+-------------+-------------------------+-------------------------+

When a repeated value is found, we are not adding it to the results array, that's fine. Problem is that we're discarding the array of previous values, and picking the current duplicate value.