I'm getting the following error when running the module using a Postgres database:
PDOException: SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: ! boolean LINE 4: WHERE (fde.entity_id IN ('1')) AND (!(fde.endpoints_entity... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.: SELECT fde.endpoints_entity_id AS endpoints_entity_id, fde.endpoints_entity_type AS endpoints_entity_type, fde.endpoints_r_index AS endpoints_r_index, fde.entity_id AS entity_id, fde.revision_id AS revision_id FROM {field_data_endpoints} fde WHERE (fde.entity_id IN (:db_condition_placeholder_0)) AND (!(fde.endpoints_entity_type = :entity_type AND fde.endpoints_entity_id = :entity_id)) ; Array ( [:db_condition_placeholder_0] => 1 [:entity_type] => node [:entity_id] => 65 ) in relation_select_entity_get_relations() (line 786 of /var/www/aegir/platforms/drupal-7.14/sites/all/modules/relation_select/relation_select.module).
This comes from line 781 of relation_select.module
$query->where('!(fde.endpoints_entity_type = :entity_type AND fde.endpoints_entity_id = :entity_id)' ...
For Postgres if this reads as follows (using NOT instead of !):-
$query->where('NOT(fde.endpoints_entity_type = :entity_type AND fde.endpoints_entity_id = :entity_id)' ...
The query runs. Thanks for the module btw, and apologies for not trying in mysql - I don't have an instance of it here.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | relation_select.not_not_bang.1619108.3.patch | 638 bytes | Gaelan |
Comments
Comment #1
Jeffrey04 commentedthanks for the workaround to the problem :)
Comment #2
Gaelan commentedThis problem exists on SQLite as well, with a similar error:
Comment #3
Gaelan commentedHere's a patch.
Note: I did not find the bug, or fix it. I simply discovered that the bug also exists on SQLite, and created a patch out of the existing fix.
Comment #4
Gaelan commentedComment #5
dlu commentedI tried this out with MariaDB and it appears to work correctly.
Changed priority to Major because this bug keeps the module from being usable.