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.
Comments
Comment #2
e0ipsoComment #3
e0ipso