Query q = new Query(kind, parentEntity.getKey());
DatastoreServiceConfig config = getStoreManager().getDefaultDatastoreServiceConfigForReads();
DatastoreService datastoreService = DatastoreServiceFactoryInternal.getDatastoreService(config);
// We have to pull back all children because the datastore does not let us filter ancestors by
// depth and an indirect child could come back before a direct child. eg: a/b/c, a/c
for (Entity e : datastoreService.prepare(q).asIterable()) {
if (parentEntity.getKey().equals(e.getKey().getParent())) {
return EntityUtils.entityToPojo(e, childCmd, clr, ec, false, ec.getFetchPlan());
// We are potentially ignoring data errors where there is more than one
// direct child for the one to one. Unfortunately, in order to detect
// this we need to read all the way to the end of the Iterable and that