Closed radovanradic closed 4 months ago
Failed conditions
48.8% Coverage on New Code (required ≥ 70%)
We should probably store the projected property name
We should probably store the projected property name
Not sure what you mean. Projected property is stored in mongoPreparedQuery.getAggregation().getPipeline().get(...)
and I tried this approach first https://github.com/micronaut-projects/micronaut-data/pull/2950/commits/07ba513861ccf3e975ba9db0a2df411241755848#diff-a9e8459c8b432459acc2ee2c85b420f0e99af0c8e6614c86d15567a897f83f39R167 but current one looks more safe regarding performance and potential risk of regression.
This workaround/fix resolves the issue There is logic to read
@Introspected
object from Mongo but document does not have values on the document root as mapper expects it in the case of this issue. So, catching error and falling back to this blockin this method resolves the issue. Maybe not the best solution, but resolves this case with minimal code changes that could cause other regression.