We're updating the issue view to help you get more done. 

GridFS doesn't work when used in an associations

Description

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.

It seems the issue is that we don't convert the value in all the required places and need further investigation.

1 2 3 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)

Environment

None

Status

Assignee

Unassigned

Reporter

Davide D'Alto

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Priority

Major