gearbox-solutions / eloquent-filemaker

A Model extension and Eloquent driver for Laravel connecting to FileMaker through the Data API
https://gearboxgo.com
MIT License
54 stars 16 forks source link

Grouped where clauses #45

Closed codemongerr closed 5 months ago

codemongerr commented 1 year ago

If multiple where clauses are grouped together to find records based on a keyword, it does not work and throws an error.

$query->where(function($q) {
    $q->where('first_name', '~', 'jack')->orWhere('last_name', '~', 'jack');
}); 
error
Smef commented 1 year ago

Are you trying to do this? $query->where('first_name', 'jack')->orWhere('last_name', 'jack');

~ is an operator for getting similar sounding Japanese characters, which doesn't seem to be what you're doing here, and FileMaker doesn't support subqueries like SQL databases. Constrain Found Set also doesn't work through sequential data API calls. What are you trying to accomplish with this find?

https://support.claris.com/s/article/Refining-find-requests-in-FileMaker-Pro-using-find-operators-1503693059311?language=en_US

Smef commented 5 months ago

Closing since we haven't heard a response.