@prisma/orm-toolchain 8.0.0-rc.18-dev.31 → 8.0.0-rc.18-dev.32
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/dist/cli.mjs +6 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/quick-reference-mongo.md +1 -1
- package/package.json +12 -12
package/dist/cli.mjs
CHANGED
|
@@ -40,7 +40,7 @@ import { applyEdits, modify, parse, printParseErrorCode } from "jsonc-parser";
|
|
|
40
40
|
import stringWidth from "string-width";
|
|
41
41
|
import { bold, createColors, cyan, cyanBright, dim, green, yellow } from "colorette";
|
|
42
42
|
import { build } from "esbuild";
|
|
43
|
-
//#region ../../../1-framework/3-tooling/cli/dist/load-config-
|
|
43
|
+
//#region ../../../1-framework/3-tooling/cli/dist/load-config-DAQI6U-B.mjs
|
|
44
44
|
/**
|
|
45
45
|
* `isStructuredError` is the repo's own check, and it is the one that matters here: it holds the
|
|
46
46
|
* regular expression for a dotted `NAMESPACE.SUBCODE`, so only a code the protocol accepts
|
|
@@ -4316,7 +4316,7 @@ export const contract = defineContract(
|
|
|
4316
4316
|
User: model('User', {
|
|
4317
4317
|
collection: 'users',
|
|
4318
4318
|
fields: {
|
|
4319
|
-
|
|
4319
|
+
id: field.objectId().mongo({ field: '_id' }),
|
|
4320
4320
|
email: field.string(),
|
|
4321
4321
|
username: field.string().optional(),
|
|
4322
4322
|
name: field.string().optional(),
|
|
@@ -4422,26 +4422,26 @@ export const contract = defineContract(
|
|
|
4422
4422
|
User: model('User', {
|
|
4423
4423
|
collection: 'users',
|
|
4424
4424
|
fields: {
|
|
4425
|
-
|
|
4425
|
+
id: field.objectId().mongo({ field: '_id' }),
|
|
4426
4426
|
email: field.string(),
|
|
4427
4427
|
username: field.string().optional(),
|
|
4428
4428
|
name: field.string().optional(),
|
|
4429
4429
|
},
|
|
4430
4430
|
relations: {
|
|
4431
|
-
posts: rel.hasMany('Post', { from: '
|
|
4431
|
+
posts: rel.hasMany('Post', { from: 'id', to: 'authorId' }),
|
|
4432
4432
|
},
|
|
4433
4433
|
}),
|
|
4434
4434
|
|
|
4435
4435
|
Post: model('Post', {
|
|
4436
4436
|
collection: 'posts',
|
|
4437
4437
|
fields: {
|
|
4438
|
-
|
|
4438
|
+
id: field.objectId().mongo({ field: '_id' }),
|
|
4439
4439
|
title: field.string(),
|
|
4440
4440
|
content: field.string().optional(),
|
|
4441
4441
|
authorId: field.objectId(),
|
|
4442
4442
|
},
|
|
4443
4443
|
relations: {
|
|
4444
|
-
author: rel.belongsTo('User', { from: 'authorId', to: '
|
|
4444
|
+
author: rel.belongsTo('User', { from: 'authorId', to: 'id' }),
|
|
4445
4445
|
},
|
|
4446
4446
|
}),
|
|
4447
4447
|
},
|