Skip to content

Comments

Add adapter reloading when using different instances of sails#28

Open
nicolapalavecino wants to merge 1 commit intobalderdashy:masterfrom
nicolapalavecino:master
Open

Add adapter reloading when using different instances of sails#28
nicolapalavecino wants to merge 1 commit intobalderdashy:masterfrom
nicolapalavecino:master

Conversation

@nicolapalavecino
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch sails-hook-orm@4.0.2 for the project I'm working on and it works successfully.

I was trying to use two different instances of Sails to programmatically port some data from one database to another (same database technology but different clusters).

const sails1 = new Sails();
const sails2 = new Sails();
sails1.load(/* database configuration 1 */)
sails2.load(/* database configuration 2 */) // <-- ORM fails here since adapter is already registered

// Make data relocation

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant