Both queries:

SELECT base.pid AS pid, base.name AS name, base.uid AS uid
FROM  entity_test base
WHERE  (base.pid IN ('1z2sfdgsdfg'));

and

SELECT base.pid AS pid, base.name AS name, base.uid AS uid
FROM  entity_test base
WHERE  (base.pid IN (1));

Return a record for the entity_test id:1 entity. That is because of:

MariaDB [drupal]> SELECT CAST('1z2sfdgsdfg' AS INT);
+----------------------------+
| CAST('1z2sfdgsdfg' AS INT) |
+----------------------------+
|                          1 |
+----------------------------+
1 row in set, 1 warning (0.00 sec)

This is fixed in core's default entity controller by cleaning the IDs based on the schema contained in the entity definition.

This patch adds the $this->cleanIds($ids) to fix this.

CommentFileSizeAuthor
#2 2569333-clean-entity-ids-1.patch609 bytese0ipso

Comments

e0ipso created an issue. See original summary.

e0ipso’s picture

StatusFileSize
new609 bytes
e0ipso’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: 2569333-clean-entity-ids-1.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: 2569333-clean-entity-ids-1.patch, failed testing.