664665666667668669670671672673674
ref = query.findUnique(); } else { // use the default reference options ref = desc.createReference(null, id); } if (ctx != null && (ref instanceof EntityBean)) { // Not putting a vanilla reference in the persistence context ctx.put(id, ref);