SQL mapper: tweaks
Merge pull request #574 from xfra35/issue574

SQL mapper: tweaks