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
Youness opened DATAMONGO-1040 and commented
Unlike other methods, deleteAll repository queries don't use the collection name provided by MongoEntityMetadata. This prevents me to use multiple collection names for a same Entity.
In AbstractMongoQuery$AbstractMongoQuery :
private Object deleteAndConvertResult(Query query, MongoEntityMetadata<?> metadata) { if (method.isCollectionQuery()) { return operations.findAllAndRemove(query, metadata.getJavaType()); } WriteResult writeResult = operations.remove(query, metadata.getJavaType(), metadata.getCollectionName()); return writeResult != null ? writeResult.getN() : 0L; }
A simple change will fix that :
if (method.isCollectionQuery()) { return operations.findAllAndRemove(query, metadata.getJavaType(), metadata.getCollectionName()); }
Thanks
Affects: 1.5.4 (Dijkstra SR4)
Referenced from: pull request #223
Backported to: 1.5.5 (Dijkstra SR5)
The text was updated successfully, but these errors were encountered:
Christoph Strobl commented
good catch - thanks!
Sorry, something went wrong.
christophstrobl
No branches or pull requests
Youness opened DATAMONGO-1040 and commented
Unlike other methods, deleteAll repository queries don't use the collection name provided by MongoEntityMetadata. This prevents me to use multiple collection names for a same Entity.
In AbstractMongoQuery$AbstractMongoQuery :
A simple change will fix that :
Thanks
Affects: 1.5.4 (Dijkstra SR4)
Referenced from: pull request #223
Backported to: 1.5.5 (Dijkstra SR5)
The text was updated successfully, but these errors were encountered: