Issue #1003788 by stefan.r, Alan D., Josh Waihi, JimmyAx, robhardwick, wiifm, twistor, pwolanin, bzrudi71, bellHead, john_brown: Fixed PostgreSQL: PDOException:Invalid text representation when attempting to load an entity with a string or non-scalar ID.