Make sure the entity class uses static instead of self.