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

facet_m2m gets confused by multiple relationships #495

Open
simonw opened this issue May 29, 2019 · 2 comments
Open

facet_m2m gets confused by multiple relationships #495

simonw opened this issue May 29, 2019 · 2 comments

Comments

@simonw
Copy link
Owner

simonw commented May 29, 2019

I got this for a database I was playing with:

hackathon__hacks_project__24_rows

I think this is because of these three tables:

hackathon__select___from_sqlite_master_

@simonw
Copy link
Owner Author

simonw commented May 30, 2019

I think there are a few steps to solving this:

  • Define a variant of ?_facet_m2m={..} that takes a JSON object which specifies which middle and destination table should be used, and via which columns
  • Teach the Facet ManyToManyFacet.suggest() method to check for multiple conflicting m2m relationships and use the new JSON URL for them. Also pick non-conflicting display names for those facets.

@simonw
Copy link
Owner Author

simonw commented Jul 7, 2019

Part of #551

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant