Skip to content

Hotfix: Changes to the async initialization sequence, #5

Open
StephaneSeyvoz wants to merge 1 commit intocoturiv:masterfrom
StephaneSeyvoz:hotfix-no-repository-found
Open

Hotfix: Changes to the async initialization sequence, #5
StephaneSeyvoz wants to merge 1 commit intocoturiv:masterfrom
StephaneSeyvoz:hotfix-no-repository-found

Conversation

@StephaneSeyvoz
Copy link

Hotfix: Changes to the async initialization sequence

Checked using Ionic 5.4.4 and Cordova 9.0.0 installed globally, deploying on an Android 9 (API level 28) emulator and an Android 7 device, both in 'dev' and 'prod' profiles.

This solves the

'ERROR …Error: Uncaught (in promise): RepositoryNotFoundError: No repository for "post" was found. Looks like this entity is not registered in current default connection?'

error, happening because the getRepository('post') call in home.page would happen before the TypeORM connection created by the db.service was ready, despite trying to wait for its initialization in app.component.

This is of course just a suggestion of correction, feel free to adapt as you wish.

…Error: Uncaught (in promise): RepositoryNotFoundError: No repository for "post" was found. Looks like this entity is not registered in current default connection?' case
@StephaneSeyvoz StephaneSeyvoz mentioned this pull request Oct 16, 2019
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.

1 participant