Added a few modifications to the ORM abstraction layer.