Hi is there any update on this question? I am facing the same issue with updating a document that has a repeatable component.
Using strapi 3.4.5
Thanks
UPDATE:
I have found a workaround for now.
// Update room in DB with new stream
const stream = {
users_permissions_user: userId,
channel: uuidv4()
}
const room = await strapi.query('rooms').findOne({id:roomId})
const streams = room.streams.map(s => ({
...s,
_id: s._id.toString()
}))
streams.push(stream)
room.streams = streams
const updated = await strapi.query('rooms').update({id:roomId}, room)
The above code works. The issue existed before I mapped the streams and converted the existing streams _id to strings ( _id: s._id.toString()).
It seems strapi’s update query doesn’t handle objectId types for nested components.
Is this currently a bug, or is my approach to trying to find and update a document containing components not conventional?
Cheers