Closed basquiat78 closed 1 year ago
Honestly I don't use aliases, with records creating new projection types is really cheap.
Does this work with regular querydsl? I'm trying to understand whether this is a general querydsl problem or something specific to this project.
@lpandzic
ok, I have identified the issue regarding this
i debug MappingR2dbcConverter
-> readFrom
this issue is due to PascalNameStrategy
Both column names and aliases are affected by this PascalNameStrategy.
if use PascalNameStrategy, aliases columName change OrderAt
if use CamelNameStrategy, , aliases columName change order_at
but queryDSL with JPA, aliase columName is 'orderAt', not changed
so For this reason, failed mapping property
Therefore, depending on the strategy used, this aspect should also be handled accordingly.
# if use PascalNameStrategy
e.g order.createdAt.`as`("OrderAt")
# if use CamelNameStrategy
e.g order.createdAt.`as`("order_at")
Ok, so you sorted out your problem? Nothing should be changed in the project?
@lpandzic
Yes! But you need to guideline this issue
Can you create a PR with the fix and a test?
I'm closing this one as stale.
e.g
error
I have given aliases to duplicate column names. However, when the variable names in the custom and order entities are the same, the subsequent columns appear as null.
of course, f there are no conflicting columns, the execution proceeds successfully.
What are the possible solutions I can consider to resolve this issue?