@mikro-orm/entity-generator 6.4.8-dev.4 → 6.4.8-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SourceFile.js +7 -0
- package/package.json +3 -3
package/SourceFile.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SourceFile = exports.identifierRegex = void 0;
|
|
4
4
|
const core_1 = require("@mikro-orm/core");
|
|
5
5
|
const node_path_1 = require("node:path");
|
|
6
|
+
const node_util_1 = require("node:util");
|
|
6
7
|
const CoreImportsHelper_1 = require("./CoreImportsHelper");
|
|
7
8
|
/**
|
|
8
9
|
* @see https://github.com/tc39/proposal-regexp-unicode-property-escapes#other-examples
|
|
@@ -621,6 +622,9 @@ class SourceFile {
|
|
|
621
622
|
getManyToManyDecoratorOptions(options, prop) {
|
|
622
623
|
this.entityImports.add(prop.type);
|
|
623
624
|
options.entity = `() => ${prop.type}`;
|
|
625
|
+
if (prop.orderBy) {
|
|
626
|
+
options.orderBy = (0, node_util_1.inspect)(prop.orderBy);
|
|
627
|
+
}
|
|
624
628
|
if (prop.mappedBy) {
|
|
625
629
|
options.mappedBy = this.quote(prop.mappedBy);
|
|
626
630
|
return;
|
|
@@ -655,6 +659,9 @@ class SourceFile {
|
|
|
655
659
|
this.entityImports.add(prop.type);
|
|
656
660
|
options.entity = `() => ${prop.type}`;
|
|
657
661
|
options.mappedBy = this.quote(prop.mappedBy);
|
|
662
|
+
if (prop.orderBy) {
|
|
663
|
+
options.orderBy = (0, node_util_1.inspect)(prop.orderBy);
|
|
664
|
+
}
|
|
658
665
|
}
|
|
659
666
|
getEmbeddedPropertyDeclarationOptions(options, prop) {
|
|
660
667
|
this.entityImports.add(prop.type);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/entity-generator",
|
|
3
|
-
"version": "6.4.8-dev.
|
|
3
|
+
"version": "6.4.8-dev.5",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@mikro-orm/knex": "6.4.8-dev.
|
|
61
|
+
"@mikro-orm/knex": "6.4.8-dev.5",
|
|
62
62
|
"fs-extra": "11.3.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@mikro-orm/core": "^6.4.7"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@mikro-orm/core": "6.4.8-dev.
|
|
68
|
+
"@mikro-orm/core": "6.4.8-dev.5"
|
|
69
69
|
}
|
|
70
70
|
}
|