-
Notifications
You must be signed in to change notification settings - Fork 197
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
After upgrade Micronaut version can't compile project - unable to implement Repository method for projection Entity with embedded ID #2705
Comments
Looks like introduced here #2495 with DTO association support |
@alapierre Can you please submit simple app that reproduces the error? |
yes, sure. I will prepare demo app for you. |
Ok, I was able to reproduce. It happens with |
after upgrading to Micronaut to The workaround is to use old fason new operator in a query, eg: @Query("SELECT new io.alapierre.integrator.dto.InvoiceIdocId(i.id, i.idocId) FROM Invoice i WHERE i.sessionId = :sessionId AND i.id.tenant = :tenant")
List<InvoiceIdocId> findBySessionIdAndIdTenant(String sessionId, String tenant); |
I was able to reproduce, thanks. Maybe the solution would be to use |
yes, workaround is only to solve problem now. Let me know if I can help with that in any way. Thank you. |
Expected Behavior
project should compile and runs like in MN 4.1.3
Actual Behaviour
I upgraded Micronaut from 4.1.3 to 4.2.2 and my project stop compile with error:
method looks like that:
and it use projections from Entity class to DTO. Entity has composite EmbeddedId key
InvoiceId
SalesInvoiceShortDto
Invoice
When I remove
InvoiceId id
property fromSalesInvoiceShortDto
it works - but it is not what I want to do...Steps To Reproduce
No response
Environment Information
JDK 17
Example Application
No response
Version
4.2.2
The text was updated successfully, but these errors were encountered: