You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This line of code will return a connection right after it's created as step one of createConnection in line 16, but step two buildMetadatas may not be finished yet. In that case the connection will throw an error when trying to get entity repository.
To reproduce it, trigger two async init operations on a new new EventStore(config.dbConnections.eventStore as never)
const eventStoreRepo = new EventStoreRepoTypeOrm(config.dbConnections.eventStore as never)
eventStoreRepo.init()
eventStoreRepo.init()
Error:
Solutions:
reuse the connection only after the entity metadatas are registered
init the repositories outside only once at a time
The text was updated successfully, but these errors were encountered:
This line of code will return a connection right after it's created as step one of
createConnection
in line 16, but step twobuildMetadatas
may not be finished yet. In that case the connection will throw an error when trying to get entity repository.To reproduce it, trigger two async init operations on a new new EventStore(config.dbConnections.eventStore as never)
Error:
Solutions:
The text was updated successfully, but these errors were encountered: