Object-relational mapping framework