Hooks with external database

The same code that allows me to search an internal database with no issues produces an error when I apply it to an external MySQL database:

" Hook afterQuery for collection MySQL/table1 result ignored! Expected hook result to resolve to an object with an ‘_id’ property, but got an object without the ‘_id’ property "

I was thinking that my MySQL/table1 table needed an index named “_id” so I added it but I still got the same error. Does anyone happen to know what this particular error is referring to?