apply the DomainClass trait to classes marked with @Entity