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

Fix model generation at module activation #2757

Merged
merged 5 commits into from
Jun 15, 2020

Conversation

roadster31
Copy link
Contributor

This PR fixes a problem when a module is activated: the postActivation() or preActivation() methods may use the module's model classes, for example to check if module schema exists in the database. But when these methods are called, the propel cache has not been generated, and the model Base and Map classes don't exist yet in the Propel cache.

A propel cache generation is now forced after the module activation state has been saved in the database, but before calls to postActivation() or preActivation()

@lopes-vincent lopes-vincent merged commit 0847aee into thelia:master Jun 15, 2020
Lucanis pushed a commit to Lucanis/thelia that referenced this pull request Feb 21, 2022
* Fix model generation at module activation

* Fix imports and multiple $cacheRefresh = false

* Fixed unit tests

Co-authored-by: Franck Allimant <fallimant@openstudio.fr>
Co-authored-by: Vincent Lopes-Vicente <vlopesvicente@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants