I'm not sure why the database engine is the only still using getKeyName(), but it should be using getScoutKeyName() as all the others. I just found this while trying to set a custom ID for my searches other than the one I'm using for normal usage of the searchable model.
Scout was raising a Column 'id' in order clause is ambiguous caused by an unqualified order by id that was not possible to customize as the only way would be by overloading getKeyName() and that would break how things work for my Post model out of the search context.
I'm not sure why the database engine is the only still using
getKeyName()
, but it should be usinggetScoutKeyName()
as all the others. I just found this while trying to set a custom ID for my searches other than the one I'm using for normal usage of the searchable model.While trying to join a table:
Scout was raising a
Column 'id' in order clause is ambiguous
caused by an unqualifiedorder by id
that was not possible to customize as the only way would be by overloadinggetKeyName()
and that would break how things work for my Post model out of the search context.