You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like inline capabilities for BelongsToMany relationships too. There are some packages around, but they either don't support pivot fields (attaching / detaching only), assume that there will always be an id field on the pivot table (we usually just have a two-column primary key) or assume that models have an integer as primary key (we usually have UUIDs). Also, I really like this packages approach with using the native Nova relation field and adding the inline() method to them.
I've looked into what would be needed to add support for BelongsToMany to this package:
As @yiukamsum already found out and proposed, there will need to be a BelongsToManyObserver to handle the server side requirements.
I experimented with the observer and while I did no longer get the 'this relation is not supported'-exception, the form renders in a way that is suitable to adding new objects (like you would with HasMany) instead of syncing with existing objects. Conclusion: the frontend needs significant work too.
As syncing with existing objects is so different from the relationships this package currently supports, I'm starting to doubt if BelongsToMany support should even be part of it. I'd like to know how maintainers of and significant contributors to this package think about that, before further action.
No description provided.
The text was updated successfully, but these errors were encountered: