}
}
public static Key getKeyFromParent(Object obj, Key parentKey, ClassInfo parentInfo, Field parentField) {
Class<?> clazz = obj.getClass();
ClassInfo info = ClassInfo.getClassInfo(clazz);
try {
Field idField = info.getIdField();
Object value = Util.readField(obj, idField);
// TODO verify that returning NULL is not a bad thing
if(value == null) return null;
Class<?> type = idField.getType();