query.setSelectionObject(instance);
query.setIsExecutionClone(true);
FetchGroup simpleFetchGroup = new FetchGroup();
for (String propertyName : instance.fetchPropertiesManager().getPropertyNames()) {
if (instance.isSet(propertyName)) {
simpleFetchGroup.addAttribute(propertyName);
}
}
query.setFetchGroup(simpleFetchGroup);
// read the existing object into the uow
uow.executeQuery(query);