private static void validateOneToManyAnnotation(final Method method) { final OneToMany oneToMany = method.getAnnotation(OneToMany.class); if (oneToMany != null) { final String reverse = oneToMany.reverse(); if (reverse.length() != 0) { try { method.getReturnType().getComponentType().getMethod(reverse); } catch (final NoSuchMethodException exception) { throw new IllegalArgumentException(method + " has a OneToMany annotation with an invalid reverse element value. It must be the name of the corresponding getter method on the related entity.", exception); } } } }
private static void validateOneToManyAnnotation(final Method method) { final OneToMany oneToMany = method.getAnnotation(OneToMany.class); if (oneToMany != null) { final String reverse = oneToMany.reverse(); if (reverse.length() != 0) { try { method.getReturnType().getComponentType().getMethod(reverse); } catch (final NoSuchMethodException exception) { throw new IllegalArgumentException(method + " has a OneToMany annotation with an invalid reverse element value. It must be the name of the corresponding getter method on the related entity.", exception); } } } }
final String whereClause = where(annotation, getFieldNameConverter()); final Preload preloadAnnotation = (Preload) remoteType.getAnnotation(Preload.class); final Method remoteMethod = remoteType.getMethod(annotation.reverse()); final String remotePolymorphicTypeFieldName = getPolymorphicTypeFieldName(remoteMethod); final StringBuilder sql = new StringBuilder("SELECT ");
if (oneToManyAnnotation.reverse().isEmpty()) { ret = legacyFetchOneToMany((RawEntity<K>) proxy, method, oneToManyAnnotation); } else {
final String whereClause = where(annotation, getFieldNameConverter()); final Preload preloadAnnotation = (Preload) remoteType.getAnnotation(Preload.class); final Method remoteMethod = remoteType.getMethod(annotation.reverse()); final String remotePolymorphicTypeFieldName = getPolymorphicTypeFieldName(remoteMethod); final StringBuilder sql = new StringBuilder("SELECT ");
if (oneToManyAnnotation.reverse().isEmpty()) { ret = legacyFetchOneToMany((RawEntity<K>) proxy, method, oneToManyAnnotation); } else {