Updated mapping code in ORM namespace