-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: call listeners for array embeddeds in MongoDB (#4260)
* fix call listeners for array embeddeds * fix tests * fix tests Co-authored-by: AlexMesser <dmzt08@gmail.com>
- Loading branch information
1 parent
9b6d7bc
commit 2dc355b
Showing
4 changed files
with
53 additions
and
4 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
16 changes: 16 additions & 0 deletions
16
test/functional/mongodb/basic/embedded-columns-listeners/entity/Tags.ts
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {Column} from "../../../../../../src/decorator/columns/Column"; | ||
import {BeforeInsert} from "../../../../../../src"; | ||
|
||
export class Tags { | ||
|
||
@Column() | ||
name: string; | ||
|
||
@Column() | ||
used?: number; | ||
|
||
@BeforeInsert() | ||
beforeInsert() { | ||
this.used = 100; | ||
} | ||
} |
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