-
-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-hydrate cached metadata in JavaScriptMetadataProvider
- this fixes missing onUpdate handler as it was lost when serializing to JSON cache
- Loading branch information
Martin Adamek
committed
Feb 28, 2019
1 parent
bc0a8c8
commit 9fc4454
Showing
7 changed files
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { EntityMetadata } from '../decorators/Entity'; | ||
import { MikroORMOptions } from '../MikroORM'; | ||
import { Utils } from '../utils/Utils'; | ||
|
||
export abstract class MetadataProvider { | ||
|
||
constructor(protected readonly options: MikroORMOptions) { } | ||
|
||
abstract discover(meta: EntityMetadata, name: string): void; | ||
abstract discoverEntity(meta: EntityMetadata, name: string): void; | ||
|
||
loadFromCache(meta: EntityMetadata, cache: EntityMetadata): void { | ||
Utils.merge(meta, cache); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters