A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on Hydra::Works) and providing a generator for defining object types with custom workflows, views, access controls, etc.
When I try to transition an object in a Sipity workflow, I get an error in PermissionQuery.scope_users_for_entity_and_roles: "ActiveRecord::StatementInvalid (PG::UndefinedFunction: ERROR: operator does not exist: integer = character varying", because there is a mismatch between the user.id column (integer) and the subquery (which produces varchars). Note: this error doesn't happen with SQLite, but does happen with PostgreSQL.
When I try to transition an object in a Sipity workflow, I get an error in PermissionQuery.scope_users_for_entity_and_roles: "ActiveRecord::StatementInvalid (PG::UndefinedFunction: ERROR: operator does not exist: integer = character varying", because there is a mismatch between the user.id column (integer) and the subquery (which produces varchars). Note: this error doesn't happen with SQLite, but does happen with PostgreSQL.
The query is being executed here: https://github.com/projecthydra/curation_concerns/blob/master/app/services/curation_concerns/workflow/permission_query.rb#L267
We should be able to explicitly cast the user.id value to a varchar.