@mikro-orm/knex 7.0.0-dev.25 → 7.0.0-dev.27
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.
|
@@ -167,7 +167,7 @@ export class SqliteSchemaHelper extends SchemaHelper {
|
|
|
167
167
|
if (col.hidden > 1) {
|
|
168
168
|
/* v8 ignore next */
|
|
169
169
|
const storage = col.hidden === 2 ? 'virtual' : 'stored';
|
|
170
|
-
const re = `(generated always)? as \\((.*)\\)( ${storage})
|
|
170
|
+
const re = new RegExp(`(generated always)? as \\((.*)\\)( ${storage})?$`, 'i');
|
|
171
171
|
const match = columnDefinitions[col.name].definition.match(re);
|
|
172
172
|
if (match) {
|
|
173
173
|
generated = `${match[2]} ${storage}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "7.0.0-dev.
|
|
3
|
+
"version": "7.0.0-dev.27",
|
|
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
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"kysely": "0.28.
|
|
53
|
+
"kysely": "0.28.7",
|
|
54
54
|
"sqlstring": "2.3.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@mikro-orm/core": "^6.5.
|
|
57
|
+
"@mikro-orm/core": "^6.5.4"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
60
|
+
"@mikro-orm/core": "7.0.0-dev.27"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -218,9 +218,10 @@ export class ObjectCriteriaNode extends CriteriaNode {
|
|
|
218
218
|
// - if the owning column is null, the row is missing, we don't apply the filter
|
|
219
219
|
// - if the target column is not null, the row is matched, we apply the filter
|
|
220
220
|
if (toOneProperty && this.prop.nullable && options?.filter) {
|
|
221
|
+
const key = this.prop.owner ? this.prop.name : this.prop.referencedPKs;
|
|
221
222
|
qb.andWhere({
|
|
222
223
|
$or: [
|
|
223
|
-
{ [
|
|
224
|
+
{ [alias + '.' + key]: null },
|
|
224
225
|
{ [nestedAlias + '.' + Utils.getPrimaryKeyHash(this.prop.referencedPKs)]: { $ne: null } },
|
|
225
226
|
],
|
|
226
227
|
});
|
|
@@ -511,7 +511,7 @@ export class SchemaComparator {
|
|
|
511
511
|
return str
|
|
512
512
|
?.replace(/_\w+'(.*?)'/g, '$1')
|
|
513
513
|
.replace(/in\s*\((.*?)\)/ig, '= any (array[$1])')
|
|
514
|
-
.replace(/['"`()]|::\w+| +/g, '')
|
|
514
|
+
.replace(/['"`()\n[\]]|::\w+| +/g, '')
|
|
515
515
|
.replace(/anyarray\[(.*)]/ig, '$1')
|
|
516
516
|
.toLowerCase();
|
|
517
517
|
};
|