Static weaving for ORM