Entity Reference module creates an unusual where clause
The Entity Reference module creates a where clause comparing two database fields. There is a bit of code in EntityReference that manually alters the where's left side from anonymous_user
to :anonymous_user
. The pgsql driver changes this to : anonymous_user::text
when it sets up some field casting for LIKE
and ILIKE
comparisons.