Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

querydsl scala quick fix in spring data [DATACMNS-938] #1392

Open
spring-projects-issues opened this issue Nov 19, 2016 · 2 comments
Open

querydsl scala quick fix in spring data [DATACMNS-938] #1392

spring-projects-issues opened this issue Nov 19, 2016 · 2 comments
Assignees
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

Comments

@spring-projects-issues
Copy link

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)

@spring-projects-issues spring-projects-issues added type: bug A general bug status: ideal-for-contribution An issue that a contributor can help us with in: core Issues in core support labels Dec 30, 2020
etrandafir93 added a commit to etrandafir93/spring-data-commons that referenced this issue Jan 19, 2024
@etrandafir93
Copy link

hello @spring-projects-issues,

I have created a PR for this small issue.
Let me know if I can/should do anything else.

Cheers,

@mp911de mp911de self-assigned this Jan 22, 2024
@mp911de
Copy link
Member

mp911de commented Jan 22, 2024

Do you have a reproducer project handy that shows the Scala case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants