Last active
June 17, 2019 19:24
-
-
Save B4nan/294405597b6371030ac2ee2e119cf14a to your computer and use it in GitHub Desktop.
Defining version properties for optimistic locking in MikroORM
This file contains hidden or 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
| export class User { | |
| // ... | |
| @Property({ version: true }) | |
| version: number; | |
| // ... | |
| } |
This file contains hidden or 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
| export class Book { | |
| // ... | |
| @Property({ version: true }) | |
| version: Date; | |
| // ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment