@mikro-orm/entity-generator 7.1.0-dev.13 → 7.1.0-dev.15

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.
Files changed (2) hide show
  1. package/SourceFile.js +6 -0
  2. package/package.json +3 -3
package/SourceFile.js CHANGED
@@ -130,6 +130,9 @@ export class SourceFile {
130
130
  else if (typeof index.expression === 'function') {
131
131
  indexOpt.expression = `${index.expression}`.replace(')=>`', ') => `');
132
132
  }
133
+ if (typeof index.where === 'string') {
134
+ indexOpt.where = this.quote(index.where);
135
+ }
133
136
  if (isAtEntityLevel && index.properties) {
134
137
  indexOpt.properties = Utils.asArray(index.properties).map(prop => this.quote('' + prop));
135
138
  }
@@ -170,6 +173,9 @@ export class SourceFile {
170
173
  else if (typeof index.expression === 'function') {
171
174
  uniqueOpt.expression = `${index.expression}`.replace(')=>`', ') => `');
172
175
  }
176
+ if (typeof index.where === 'string') {
177
+ uniqueOpt.where = this.quote(index.where);
178
+ }
173
179
  if (isAtEntityLevel && index.properties) {
174
180
  uniqueOpt.properties = Utils.asArray(index.properties).map(prop => this.quote('' + prop));
175
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/entity-generator",
3
- "version": "7.1.0-dev.13",
3
+ "version": "7.1.0-dev.15",
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
  "keywords": [
6
6
  "data-mapper",
@@ -47,13 +47,13 @@
47
47
  "copy": "node ../../scripts/copy.mjs"
48
48
  },
49
49
  "dependencies": {
50
- "@mikro-orm/sql": "7.1.0-dev.13"
50
+ "@mikro-orm/sql": "7.1.0-dev.15"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@mikro-orm/core": "^7.0.11"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.1.0-dev.13"
56
+ "@mikro-orm/core": "7.1.0-dev.15"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"