add generic support to setMapping internal api.
fix generic managment in the result query.