Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement BelongsToMany Relationship #26

Open
brandonferens opened this issue Dec 5, 2019 · 2 comments
Open

Implement BelongsToMany Relationship #26

brandonferens opened this issue Dec 5, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@brandonferens
Copy link
Member

No description provided.

@brandonferens brandonferens added the enhancement New feature or request label Dec 5, 2019
@genesiscz
Copy link
Contributor

will this get an update, or is it dead? :(

@JeroenVanOort
Copy link

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:

  1. As @yiukamsum already found out and proposed, there will need to be a BelongsToManyObserver to handle the server side requirements.
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants