Skip to content

Commit e43b0bb

Browse files
committed
Upgrade to Grace Data 2024.0.0-M1
Closes gh-46
1 parent e807393 commit e43b0bb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

grace-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/query/MongoQuery.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,14 +487,15 @@ public Document getMongoQuery() {
487487
}
488488

489489
@Override
490+
@SuppressWarnings("unchecked")
490491
protected List executeQuery(final PersistentEntity entity, final Junction criteria) {
491492
final AbstractMongoSession mongoSession = this.mongoSession;
492493
com.mongodb.client.MongoCollection<Document> collection = mongoSession.getCollection(entity);
493494

494495
final List<Projection> projectionList = projections().getProjectionList();
495496
if (uniqueResult && projectionList.isEmpty()) {
496497
if (this.isCodecPersister) {
497-
collection = collection.withDocumentClass(entity.getJavaClass());
498+
collection = collection.withDocumentClass((Class<Document>) entity.getJavaClass());
498499
}
499500
final Object dbObject;
500501
if (criteria.isEmpty()) {
@@ -529,7 +530,7 @@ protected List executeQuery(final PersistentEntity entity, final Junction criter
529530
if (projectionList.isEmpty()) {
530531
if (this.isCodecPersister) {
531532
collection = collection
532-
.withDocumentClass(entity.getJavaClass())
533+
.withDocumentClass((Class<Document>) entity.getJavaClass())
533534
.withCodecRegistry(mongoSession.getDatastore().getCodecRegistry());
534535
}
535536
cursor = executeQuery(entity, criteria, collection, query);

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ commons-validator = "1.9.0"
66
ehcache = "2.10.6"
77
embedmongo = "4.21.0"
88
glassfish-expressly = "5.0.0"
9-
grace-data = "2024.0.0-SNAPSHOT"
9+
grace-data = "2024.0.0-M1"
1010
grace-framework = "2024.0.0-SNAPSHOT"
1111
grace-gradle = "2024.0.0-M1"
1212
groovy = "4.0.29"

0 commit comments

Comments
 (0)