((FetchGroupTracker) entity)._persistence_setSession(JpaHelper.getDatabaseSession(getEmf()));
} else if (descriptor.hasRelationships()){
for (DatabaseMapping mapping: descriptor.getMappings()){
if (mapping instanceof XMLInverseReferenceMapping){
// we require Fetch groups to handle relationships
throw new JPARSException(LoggingLocalization.buildMessage("weaving_required_for_relationships", new Object[]{}));
}
}
}
return entity;
}