-
Notifications
You must be signed in to change notification settings - Fork 72
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
Support for Multiple Databases - Breaking Change Since v1.3.36 #44
Comments
Persistence Module and Multiple DatabasesPlease also note that while we have updated the instantiation to support multiple databases (to ensure that future projects are using the correct instantiation pattern), multiple database support is still a work in progress. This means that the persistence module still expects to be operating under a single database and will not save / load data based on the database name so persistence will load the same data for every database regardless of the DB name. An update to the persistence module is coming to ensure multiple databases are supported. Other functionality should not be affected by the change to multiple DB support and should operate as expected. If you find any area of ForerunnerDB that is affected but not mentioned here, please reply to this issue and let us know so we can fix it ASAP! Thanks! |
Maybe if there is only 1 database, load if by default? |
@YuriSolovyov Multi-DB support in persistence module is pretty easy really. It's just a minor update around how the data is saved and loaded. With the addition of eager save / load mode (your issue #41) databases will also load their persistent data on first access. |
I was just thinking of how you can have some kind of backward compatibility here. |
@YuriSolovyov Ahh I see. Yes I think the plan will be to detect any previously "unasigned" data and load it in to the first DB that gets requested, then on save it will be in the new multi-db format. Technically since all ForerunnerDB projects have been single-db only up until this point it should be save to assume the saved data is for the first database being requested. |
Persist module multi-db support now available in version 1.3.52 |
Since this is now quite a few versions ago, this announcement is now being closed. |
Hmm... but the examples on the main page still use the old init procedure?? |
@mojovski Corrected :) |
In order to support multiple named databases Forerunner's instantiation has changed slightly. In previous versions you only had access to a single database that you instantiated via:
Now you have access to multiple databases via from the main forerunner instance but this requires that you change your instantiation code to:
Multiple database support is a key requirement that unfortunately requires we change the instantiation pattern as detailed above. Although this is a fundamental change to the way ForerunnerDB is instantiated we believe the impact to your projects will be minimal as it should only require you to update at most 2 lines of your project's code in order to "get it working" again.
The text was updated successfully, but these errors were encountered: