borinquenkid commented on code in PR #15583:
URL: https://github.com/apache/grails-core/pull/15583#discussion_r3131755394


##########
grails-data-mongodb/core/src/main/groovy/org/grails/datastore/mapping/mongo/engine/MongoCodecEntityPersister.groovy:
##########
@@ -175,6 +178,32 @@ class MongoCodecEntityPersister extends 
ThirdPartyCacheEntityPersister<Object> {
         new Document(AbstractMongoObectEntityPersister.MONGO_ID_FIELD, key)
     }
 
+    /**
+     * Coerce an identifier value to the {@code storedAs} type declared in the 
entity's id
+     * mapping, so that point-lookup queries target the BSON type actually on 
disk.
+     * See {@code IdentityMapping#getStoredAs()}.
+     */
+    protected Object coerceIdToStoredType(Object key, PersistentEntity entity) 
{

Review Comment:
   I don't see any test coverage for this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to