querydsl scala quick fix in spring data [DATACMNS-938] #1392
Labels
in: core
Issues in core support
status: ideal-for-contribution
An issue that a contributor can help us with
type: bug
A general bug
Jan Prach opened DATACMNS-938 and commented
createPath in org.springframework.data.querydsl.SimpleEntityPathResolver will fail for scala querydsl generated classes. The reason is that static methods in scala are "object" methods and the object has naming convention pathClassName + "$". Hence the fix is easy - just add to createPath following:
if (field == null) {
String scalaObjectPathClassName = pathClassName + "$";
pathClass = ClassUtils.forName(scalaObjectPathClassName, domainClass.getClassLoader());
field = getStaticFieldOfType(pathClass);
}
Affects: 1.12.5 (Hopper SR5)
The text was updated successfully, but these errors were encountered: