}
private static String getIdFieldNameFor(Queryable<?> object) {
for( Field f : object.getClass().getDeclaredFields() ) {
if( f.isAnnotationPresent(ModelId.class) ) {
ModelId annotation = (ModelId)f.getAnnotation(ModelId.class);
return "".equals(annotation.value()) ? f.getName() : annotation.value();
}
}
return "id";
}