More than two hours lost -and counting- to debug an issue that consisted on an integer being casted to a string, then consumed to do a database lookup as a integer again.
And that is not even the execution path I'm trying to make work.
Lesson: don't do arbitrary, uncommented castings. If its an integer is an integer no matter what layer you are in or how you choose to represent it.