php-crud-api
php-crud-api copied to clipboard
Exclude primary key from joined tables
Hi there,
Firstly thanks for this great software (especially Slim integration was something I've been waiting for).
When trying to exclude primary keys from joined tables via the url eg /records/table/1?join=table1,table2&exclude=table1.id, there's an error: <b>Notice</b>: Undefined index: id in <b>.../api.php</b> on line <b>5025</b><br />.
I know it's not a big deal -- and for sure something that can be handled from the developer's side (as in my case that I don't want some ids exposed), but it would be good to have it being supported natively.
Regards,
Christos
Thank you for your kind words. The primary keys cannot be excluded as they are mandatory for the join process that happens after the exclude is applied. It could be managed by another filter after the join, either built-in or with the existing 'after' handler. I'll keep this issue open as a feature request.