@@ -193,8 +193,6 @@ private <T> Field getFieldFromInterfaceProperty(Class<T> interfaceType, String p
193193
194194 if (propertyName .equals (extractedPropertyName )) {
195195 // Found matching getter - create a wrapper field
196- // For now, we return null and will handle this case specially
197- // Actually, let's throw a more helpful error with a workaround suggestion
198196 return createSyntheticFieldForProperty (propertyName , method );
199197 }
200198 }
@@ -209,8 +207,12 @@ private <T> Field getFieldFromInterfaceProperty(Class<T> interfaceType, String p
209207 */
210208 private Field createSyntheticFieldForProperty (String propertyName , Method getterMethod ) {
211209 try {
212- // Use a generic Object field as a template
213- // The name won't match but the infrastructure can work around it
210+ // Use a generic Object field as a template.
211+ // The field name ("property") does not match the actual property name,
212+ // but InterfacePropertyHolder.registerProperty stores the mapping between
213+ // the template field, the actual property name, and the getter method.
214+ // This allows the infrastructure to later retrieve the correct property
215+ // information for interface-based repositories, even though the field name is generic.
214216 Field templateField = InterfacePropertyHolder .class .getDeclaredField ("property" );
215217 // Store metadata about this field for later use
216218 InterfacePropertyHolder .registerProperty (templateField , propertyName , getterMethod );
0 commit comments