@mikro-orm/core 7.1.13-dev.10 → 7.1.13-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 +3 -0
- package/package.json +1 -1
- package/typings.js +4 -1
- package/utils/Utils.js +1 -1
|
@@ -1676,6 +1676,9 @@ export class MetadataDiscovery {
|
|
|
1676
1676
|
if (prop.persist === false || prop.nativeEnumName || !prop.items?.every(item => typeof item === 'string')) {
|
|
1677
1677
|
continue;
|
|
1678
1678
|
}
|
|
1679
|
+
if (prop.customType instanceof t.json || ['json', 'jsonb'].includes(prop.columnTypes?.[0])) {
|
|
1680
|
+
continue;
|
|
1681
|
+
}
|
|
1679
1682
|
this.initFieldName(prop);
|
|
1680
1683
|
let expression = null;
|
|
1681
1684
|
if (prop.enum) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.1.13-dev.
|
|
3
|
+
"version": "7.1.13-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
|
@@ -216,7 +216,10 @@ export class EntityMetadata {
|
|
|
216
216
|
if (config) {
|
|
217
217
|
const platform = config.getPlatform();
|
|
218
218
|
for (const prop of this.props) {
|
|
219
|
-
if (prop.enum &&
|
|
219
|
+
if (prop.enum &&
|
|
220
|
+
!prop.nativeEnumName &&
|
|
221
|
+
prop.items?.every(item => typeof item === 'string') &&
|
|
222
|
+
!['json', 'jsonb'].includes(prop.columnTypes?.[0])) {
|
|
220
223
|
const name = platform.getIndexName(this.tableName, prop.fieldNames, 'check');
|
|
221
224
|
const exists = this.checks.findIndex(check => check.name === name);
|
|
222
225
|
if (exists !== -1) {
|
package/utils/Utils.js
CHANGED
|
@@ -153,7 +153,7 @@ export function parseJsonSafe(value) {
|
|
|
153
153
|
/** Collection of general-purpose utility methods used throughout the ORM. */
|
|
154
154
|
export class Utils {
|
|
155
155
|
static PK_SEPARATOR = '~~~';
|
|
156
|
-
static #ORM_VERSION = '7.1.13-dev.
|
|
156
|
+
static #ORM_VERSION = '7.1.13-dev.11';
|
|
157
157
|
/**
|
|
158
158
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
159
159
|
*/
|