changed ORM so that all per-entity object database methods are class methods