throw new NucleusUserException("Collection element does not have a primary key.");
} else if (elementKey.getParent() == null) {
throw new NucleusUserException("Collection element primary key does not have a parent.");
}
DatastoreServiceConfig config = storeMgr.getDefaultDatastoreServiceConfigForReads();
DatastoreService service = DatastoreServiceFactoryInternal.getDatastoreService(config);
try {
Entity e = service.get(elementKey);
return extractIndexProperty(e, ecs, elementSm.getObjectManager());
} catch (EntityNotFoundException enfe) {