The problem seems to occur when the entity with the GridFS field is retrieved because it's in an association with another entity, In this situation the GridFS field is retrieved as is, an objectId, and not converted in the corresponding GrdiFS type.
{code} Caused by: java.lang.IllegalArgumentException: Can not set org.hibernate.ogm.datastore.mongodb.type.GridFS field com.actor.jpa.GridListEventBody.gridlist to org.bson.types.ObjectId at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) {code} |
|