@mikro-orm/core 7.0.15-dev.10 → 7.0.15-dev.11
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/metadata/MetadataDiscovery.js +1 -1
- package/package.json +1 -1
- package/typings.js +1 -1
- package/utils/EntityComparator.js +1 -1
- package/utils/Utils.js +1 -1
|
@@ -1715,7 +1715,7 @@ export class MetadataDiscovery {
|
|
|
1715
1715
|
if (!prop.customType && prop.array && prop.items) {
|
|
1716
1716
|
prop.customType = new t.enumArray(`${meta.className}.${prop.name}`, prop.items);
|
|
1717
1717
|
}
|
|
1718
|
-
const isArray = prop.type?.toLowerCase() === 'array' || prop.type?.toString().endsWith('[]');
|
|
1718
|
+
const isArray = prop.array || prop.type?.toLowerCase() === 'array' || prop.type?.toString().endsWith('[]');
|
|
1719
1719
|
if (objectEmbeddable && !prop.customType && isArray) {
|
|
1720
1720
|
prop.customType = new t.json();
|
|
1721
1721
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.0.15-dev.
|
|
3
|
+
"version": "7.0.15-dev.11",
|
|
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",
|
package/typings.js
CHANGED
|
@@ -149,7 +149,7 @@ export class EntityMetadata {
|
|
|
149
149
|
if (prop.inherited || (prop.persist === false && prop.userDefined !== false)) {
|
|
150
150
|
return false;
|
|
151
151
|
}
|
|
152
|
-
return prop.kind === ReferenceKind.SCALAR && ['string', 'number', 'boolean', 'Date'].includes(prop.type);
|
|
152
|
+
return (prop.kind === ReferenceKind.SCALAR && !prop.array && ['string', 'number', 'boolean', 'Date'].includes(prop.type));
|
|
153
153
|
});
|
|
154
154
|
this.hydrateProps = this.props.filter(prop => {
|
|
155
155
|
// `prop.userDefined` is either `undefined` or `false`
|
|
@@ -536,7 +536,7 @@ export class EntityComparator {
|
|
|
536
536
|
ret += ` && entity${path.map(k => this.wrap(k)).join('')}?.isInitialized()`;
|
|
537
537
|
}
|
|
538
538
|
ret += `) {\n`;
|
|
539
|
-
if (['number', 'string', 'boolean'].includes(prop.type.toLowerCase())) {
|
|
539
|
+
if (!prop.array && ['number', 'string', 'boolean'].includes(prop.type.toLowerCase())) {
|
|
540
540
|
return ret + ` ret${dataKey} = entity${entityKey}${unwrap};\n }\n`;
|
|
541
541
|
}
|
|
542
542
|
if (prop.kind === ReferenceKind.EMBEDDED) {
|
package/utils/Utils.js
CHANGED
|
@@ -141,7 +141,7 @@ export function parseJsonSafe(value) {
|
|
|
141
141
|
/** Collection of general-purpose utility methods used throughout the ORM. */
|
|
142
142
|
export class Utils {
|
|
143
143
|
static PK_SEPARATOR = '~~~';
|
|
144
|
-
static #ORM_VERSION = '7.0.15-dev.
|
|
144
|
+
static #ORM_VERSION = '7.0.15-dev.11';
|
|
145
145
|
/**
|
|
146
146
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
147
147
|
*/
|