@mikro-orm/entity-generator 7.0.0-dev.6 → 7.0.0-dev.8
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 +4 -4
package/SourceFile.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Cascade, Config, DecimalType, ReferenceKind, SCALAR_TYPES, UnknownType, Utils, } from '@mikro-orm/core';
|
|
2
2
|
import { parse, relative } from 'node:path';
|
|
3
|
+
import { inspect } from 'node:util';
|
|
3
4
|
import { POSSIBLE_TYPE_IMPORTS } from './CoreImportsHelper.js';
|
|
4
5
|
/**
|
|
5
6
|
* @see https://github.com/tc39/proposal-regexp-unicode-property-escapes#other-examples
|
|
@@ -618,6 +619,9 @@ export class SourceFile {
|
|
|
618
619
|
getManyToManyDecoratorOptions(options, prop) {
|
|
619
620
|
this.entityImports.add(prop.type);
|
|
620
621
|
options.entity = `() => ${prop.type}`;
|
|
622
|
+
if (prop.orderBy) {
|
|
623
|
+
options.orderBy = inspect(prop.orderBy);
|
|
624
|
+
}
|
|
621
625
|
if (prop.mappedBy) {
|
|
622
626
|
options.mappedBy = this.quote(prop.mappedBy);
|
|
623
627
|
return;
|
|
@@ -652,6 +656,9 @@ export class SourceFile {
|
|
|
652
656
|
this.entityImports.add(prop.type);
|
|
653
657
|
options.entity = `() => ${prop.type}`;
|
|
654
658
|
options.mappedBy = this.quote(prop.mappedBy);
|
|
659
|
+
if (prop.orderBy) {
|
|
660
|
+
options.orderBy = inspect(prop.orderBy);
|
|
661
|
+
}
|
|
655
662
|
}
|
|
656
663
|
getEmbeddedPropertyDeclarationOptions(options, prop) {
|
|
657
664
|
this.entityImports.add(prop.type);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/entity-generator",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-dev.
|
|
4
|
+
"version": "7.0.0-dev.8",
|
|
5
5
|
"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.",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./package.json": "./package.json",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@mikro-orm/knex": "7.0.0-dev.
|
|
53
|
+
"@mikro-orm/knex": "7.0.0-dev.8"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@mikro-orm/core": "^6.4.
|
|
56
|
+
"@mikro-orm/core": "^6.4.9"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
59
|
+
"@mikro-orm/core": "7.0.0-dev.8"
|
|
60
60
|
}
|
|
61
61
|
}
|