PIM-3264: add full ORM support