I did as suggested. I looked at the generated SQL. The problem became stranger, the full query code is as follows:
Code:
select intellectual_property.id , intellectual_property.title , intellectual_property.description , intellectual_property.ack_notes , intellectual_property.notes , intellectual_property.copyright_status , intellectual_property.fk_status_intellectual_property_id , intellectual_property.external_system_id from intellectual_property intellectual_property inner join catalog on intellectual_property.id=catalog.ip_catalog_id inner join ip_usage on intellectual_property.id=ip_usage.ip_usage_id where catalog.identifier like '%test%' or catalog.authority_id like '%test%' or ip_usage.catalog like '%test%' or ip_usage.entry like '%test%' order by intellectual_property.title
which returns nothing. But when I run the query to search either catalog table OR ip_usage table or their own I get a result for each. ie This query returns a results
Code:
select intellectual_property.id , intellectual_property.title , intellectual_property.description , intellectual_property.ack_notes , intellectual_property.notes , intellectual_property.copyright_status , intellectual_property.fk_status_intellectual_property_id , intellectual_property.external_system_id from intellectual_property intellectual_property inner join ip_usage on intellectual_property.id=ip_usage.ip_usage_id where ip_usage.catalog like '%test%' or ip_usage.entry like '%test%' order by intellectual_property.title
And so it does when subsitute catalog for ip_usage but together they are failing?
I am constructing the query correctly? Can you do a OR over two separate table values?