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

Move registry plugin to core #1996

Merged
merged 7 commits into from Jul 28, 2019

Conversation

@ricardograca
Copy link
Member

commented Jul 27, 2019

Introduction

Move the registry plugin to core Bookshelf.

Motivation

This is a useful plugin and is the best way to ensure there are no circular dependencies issues when models are located in different files.

Fixes #1557.

Proposed solution

Functionality is moved to the bookshelf.js file. Note that registered models and collections are now stored in the bookshelf.registry.models and bookshelf.registry.collections respectively. This means the change is not backwards compatible but it's not expected that users were accessing bookshelf._models and bookshelf._collections directly anyway.

A lot of the code was modernized.

@ricardograca ricardograca referenced this pull request Jul 27, 2019
3 of 3 tasks complete
- This replaces the previous bookshelf.Model.extend() method usage since 
it's preferable as it avoids circular dependencies.
@ricardograca ricardograca merged commit 189b828 into master Jul 28, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@ricardograca ricardograca deleted the rg-core-registry branch Jul 28, 2019
@ricardograca ricardograca referenced this pull request Aug 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.