querydsl scala quick fix in spring data [DATACMNS-938]
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)
hello @spring-projects-issues,
I have created a PR for this small issue. Let me know if I can/should do anything else.
Cheers,
Do you have a reproducer project handy that shows the Scala case?
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.