The official documentation for PDO state that the lastInsertId method return a string : string PDO::lastInsertId ([ string $name = NULL ] )
Thus after inserting new data into the DB, the primary key field is always a string, which causes trouble when using that record afterwards (ie : json converssion will use quotes when they it not)
Would it be possible to cast the result of the function back to the type specified in the database schema ?