use orm instead of plain sql
поправил
Merge branch 'master' of https://github.com/Unact/Renew
DEV-24637
Merge branch 'master' into releases