Skip to content

inserting new entity into metadata storage in Mikro ORM instance #2262

Answered by B4nan
hubbusysyuhada asked this question in Q&A
Discussion options

You must be logged in to vote

In v5 there is orm.discoverEntity() helper method for dynamic registration of new entities, it will basically load the metadata on the fly, no reconnection needed. You can probably do the same in v4 too, but it will be a bit more code (e.g. you will need to create new instance of MetadataDiscovery is that is not exposed in v4).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hubbusysyuhada
Comment options

Answer selected by hubbusysyuhada
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants