Make belongsTo fields editable in smart collections

Hello @Gabriele,

I re-tested everything on my own and indeed you cannot handle the BelongsTo Smart Relationship by using the set hook on the Smart Field. You indeed need to create a specific route to handle your BelongsTo Smart Relationship edition. So, unfortunately, you cannot have just one call to handle this.

See this doc on the relationship route to extends/implement so specific use case.

PUT /forest/{modelName}/{id}/relationships/{belongsToRelationName} ⟶ Update a belongs to field

Here, is another thread that gives an example of BelongsTo Smart Relationship full implementation.

I apologize for the wrong information I gave you first. :pray:

Tell me if you need more help to make it work on your project.

Kind regards,
Morgan