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

Multi-table inheritance not supported #31

Open
Suor opened this issue Feb 3, 2013 · 5 comments
Open

Multi-table inheritance not supported #31

Suor opened this issue Feb 3, 2013 · 5 comments

Comments

@Suor
Copy link
Owner

Suor commented Feb 3, 2013

More precisely, automatic event-based doesn't work properly for it. There are actually two different cases:

  1. When SubModel instance is added, changed or deleted none of BaseModel queries invalidated.
  2. When BaseModel instance changed or deleted none of queries for any submodels are invalidated.
@Suor
Copy link
Owner Author

Suor commented Feb 4, 2013

Postponed multi-table inheritance support. Some champion can implement it - and I'll thankfully merge. I will probably reconsider implementing it if this feature will gain sufficient interest one day.

@Gillingham
Copy link

Is just adding a save() method to the child models that calls invalidate_model on the parent a sanish way to get around this for now?

@pySilver
Copy link

@Suor sorry for digging into such an old ticket. Is there anything that can be done to mitigate this issue? I'm using Wagtail CMS which uses concepts of Page (base model with few fields) and SomeConcretePage (extends Page with additional fields using multi-table inheritance).

The problem im observing is that while caching works fine, invalidation is not. For time being I'm thinking either not to use it for this kind of models or doing some custom aggressive cache invalidation.

@Suor
Copy link
Owner Author

Suor commented Aug 13, 2020

I guess you can make signal handlers doing one or several invalidate_obj() calls. A concrete use case might be simple enough.

@pySilver
Copy link

I saw pending PR with some code samples, will try that! thanks!

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

3 participants