@rebasepro/server-postgresql 0.0.1-canary.09e5ec5
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/LICENSE +6 -0
- package/README.md +106 -0
- package/build-errors.txt +37 -0
- package/dist/common/src/collections/CollectionRegistry.d.ts +56 -0
- package/dist/common/src/collections/index.d.ts +1 -0
- package/dist/common/src/data/buildRebaseData.d.ts +14 -0
- package/dist/common/src/index.d.ts +3 -0
- package/dist/common/src/util/builders.d.ts +57 -0
- package/dist/common/src/util/callbacks.d.ts +6 -0
- package/dist/common/src/util/collections.d.ts +11 -0
- package/dist/common/src/util/common.d.ts +2 -0
- package/dist/common/src/util/conditions.d.ts +26 -0
- package/dist/common/src/util/entities.d.ts +58 -0
- package/dist/common/src/util/enums.d.ts +3 -0
- package/dist/common/src/util/index.d.ts +16 -0
- package/dist/common/src/util/navigation_from_path.d.ts +34 -0
- package/dist/common/src/util/navigation_utils.d.ts +20 -0
- package/dist/common/src/util/parent_references_from_path.d.ts +6 -0
- package/dist/common/src/util/paths.d.ts +14 -0
- package/dist/common/src/util/permissions.d.ts +5 -0
- package/dist/common/src/util/references.d.ts +2 -0
- package/dist/common/src/util/relations.d.ts +22 -0
- package/dist/common/src/util/resolutions.d.ts +72 -0
- package/dist/common/src/util/storage.d.ts +24 -0
- package/dist/index.es.js +11298 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +11306 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/server-postgresql/src/PostgresBackendDriver.d.ts +100 -0
- package/dist/server-postgresql/src/PostgresBootstrapper.d.ts +40 -0
- package/dist/server-postgresql/src/auth/ensure-tables.d.ts +6 -0
- package/dist/server-postgresql/src/auth/services.d.ts +192 -0
- package/dist/server-postgresql/src/cli.d.ts +1 -0
- package/dist/server-postgresql/src/collections/PostgresCollectionRegistry.d.ts +43 -0
- package/dist/server-postgresql/src/connection.d.ts +40 -0
- package/dist/server-postgresql/src/data-transformer.d.ts +58 -0
- package/dist/server-postgresql/src/databasePoolManager.d.ts +20 -0
- package/dist/server-postgresql/src/history/HistoryService.d.ts +71 -0
- package/dist/server-postgresql/src/history/ensure-history-table.d.ts +7 -0
- package/dist/server-postgresql/src/index.d.ts +13 -0
- package/dist/server-postgresql/src/interfaces.d.ts +18 -0
- package/dist/server-postgresql/src/schema/auth-schema.d.ts +868 -0
- package/dist/server-postgresql/src/schema/doctor-cli.d.ts +2 -0
- package/dist/server-postgresql/src/schema/doctor.d.ts +43 -0
- package/dist/server-postgresql/src/schema/generate-drizzle-schema-logic.d.ts +2 -0
- package/dist/server-postgresql/src/schema/generate-drizzle-schema.d.ts +1 -0
- package/dist/server-postgresql/src/schema/introspect-db-logic.d.ts +82 -0
- package/dist/server-postgresql/src/schema/introspect-db.d.ts +1 -0
- package/dist/server-postgresql/src/schema/test-schema.d.ts +24 -0
- package/dist/server-postgresql/src/services/BranchService.d.ts +47 -0
- package/dist/server-postgresql/src/services/EntityFetchService.d.ts +209 -0
- package/dist/server-postgresql/src/services/EntityPersistService.d.ts +41 -0
- package/dist/server-postgresql/src/services/RelationService.d.ts +98 -0
- package/dist/server-postgresql/src/services/entity-helpers.d.ts +38 -0
- package/dist/server-postgresql/src/services/entityService.d.ts +104 -0
- package/dist/server-postgresql/src/services/index.d.ts +4 -0
- package/dist/server-postgresql/src/services/realtimeService.d.ts +188 -0
- package/dist/server-postgresql/src/utils/drizzle-conditions.d.ts +116 -0
- package/dist/server-postgresql/src/websocket.d.ts +5 -0
- package/dist/types/src/controllers/analytics_controller.d.ts +7 -0
- package/dist/types/src/controllers/auth.d.ts +119 -0
- package/dist/types/src/controllers/client.d.ts +170 -0
- package/dist/types/src/controllers/collection_registry.d.ts +45 -0
- package/dist/types/src/controllers/customization_controller.d.ts +60 -0
- package/dist/types/src/controllers/data.d.ts +168 -0
- package/dist/types/src/controllers/data_driver.d.ts +160 -0
- package/dist/types/src/controllers/database_admin.d.ts +11 -0
- package/dist/types/src/controllers/dialogs_controller.d.ts +36 -0
- package/dist/types/src/controllers/effective_role.d.ts +4 -0
- package/dist/types/src/controllers/email.d.ts +34 -0
- package/dist/types/src/controllers/index.d.ts +18 -0
- package/dist/types/src/controllers/local_config_persistence.d.ts +20 -0
- package/dist/types/src/controllers/navigation.d.ts +213 -0
- package/dist/types/src/controllers/registry.d.ts +54 -0
- package/dist/types/src/controllers/side_dialogs_controller.d.ts +67 -0
- package/dist/types/src/controllers/side_entity_controller.d.ts +90 -0
- package/dist/types/src/controllers/snackbar.d.ts +24 -0
- package/dist/types/src/controllers/storage.d.ts +171 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/rebase_context.d.ts +105 -0
- package/dist/types/src/types/backend.d.ts +536 -0
- package/dist/types/src/types/builders.d.ts +15 -0
- package/dist/types/src/types/chips.d.ts +5 -0
- package/dist/types/src/types/collections.d.ts +856 -0
- package/dist/types/src/types/cron.d.ts +102 -0
- package/dist/types/src/types/data_source.d.ts +64 -0
- package/dist/types/src/types/entities.d.ts +145 -0
- package/dist/types/src/types/entity_actions.d.ts +98 -0
- package/dist/types/src/types/entity_callbacks.d.ts +173 -0
- package/dist/types/src/types/entity_link_builder.d.ts +7 -0
- package/dist/types/src/types/entity_overrides.d.ts +10 -0
- package/dist/types/src/types/entity_views.d.ts +61 -0
- package/dist/types/src/types/export_import.d.ts +21 -0
- package/dist/types/src/types/index.d.ts +23 -0
- package/dist/types/src/types/locales.d.ts +4 -0
- package/dist/types/src/types/modify_collections.d.ts +5 -0
- package/dist/types/src/types/plugins.d.ts +279 -0
- package/dist/types/src/types/properties.d.ts +1176 -0
- package/dist/types/src/types/property_config.d.ts +70 -0
- package/dist/types/src/types/relations.d.ts +336 -0
- package/dist/types/src/types/slots.d.ts +252 -0
- package/dist/types/src/types/translations.d.ts +870 -0
- package/dist/types/src/types/user_management_delegate.d.ts +121 -0
- package/dist/types/src/types/websockets.d.ts +78 -0
- package/dist/types/src/users/index.d.ts +2 -0
- package/dist/types/src/users/roles.d.ts +22 -0
- package/dist/types/src/users/user.d.ts +46 -0
- package/drizzle-test/0000_woozy_junta.sql +6 -0
- package/drizzle-test/0001_youthful_arachne.sql +1 -0
- package/drizzle-test/0002_lively_dragon_lord.sql +2 -0
- package/drizzle-test/0003_mean_king_cobra.sql +2 -0
- package/drizzle-test/meta/0000_snapshot.json +47 -0
- package/drizzle-test/meta/0001_snapshot.json +48 -0
- package/drizzle-test/meta/0002_snapshot.json +38 -0
- package/drizzle-test/meta/0003_snapshot.json +48 -0
- package/drizzle-test/meta/_journal.json +34 -0
- package/drizzle-test-out/0000_tan_trauma.sql +6 -0
- package/drizzle-test-out/0001_rapid_drax.sql +1 -0
- package/drizzle-test-out/meta/0000_snapshot.json +44 -0
- package/drizzle-test-out/meta/0001_snapshot.json +54 -0
- package/drizzle-test-out/meta/_journal.json +20 -0
- package/drizzle.test.config.ts +10 -0
- package/jest-all.log +3128 -0
- package/jest.log +49 -0
- package/package.json +92 -0
- package/scratch.ts +41 -0
- package/src/PostgresBackendDriver.ts +1008 -0
- package/src/PostgresBootstrapper.ts +231 -0
- package/src/auth/ensure-tables.ts +381 -0
- package/src/auth/services.ts +799 -0
- package/src/cli.ts +648 -0
- package/src/collections/PostgresCollectionRegistry.ts +96 -0
- package/src/connection.ts +84 -0
- package/src/data-transformer.ts +608 -0
- package/src/databasePoolManager.ts +85 -0
- package/src/history/HistoryService.ts +248 -0
- package/src/history/ensure-history-table.ts +45 -0
- package/src/index.ts +13 -0
- package/src/interfaces.ts +60 -0
- package/src/schema/auth-schema.ts +169 -0
- package/src/schema/doctor-cli.ts +47 -0
- package/src/schema/doctor.ts +595 -0
- package/src/schema/generate-drizzle-schema-logic.ts +765 -0
- package/src/schema/generate-drizzle-schema.ts +151 -0
- package/src/schema/introspect-db-logic.ts +542 -0
- package/src/schema/introspect-db.ts +211 -0
- package/src/schema/test-schema.ts +11 -0
- package/src/services/BranchService.ts +237 -0
- package/src/services/EntityFetchService.ts +1576 -0
- package/src/services/EntityPersistService.ts +349 -0
- package/src/services/RelationService.ts +1274 -0
- package/src/services/entity-helpers.ts +147 -0
- package/src/services/entityService.ts +211 -0
- package/src/services/index.ts +13 -0
- package/src/services/realtimeService.ts +1034 -0
- package/src/utils/drizzle-conditions.ts +1000 -0
- package/src/websocket.ts +518 -0
- package/test/auth-services.test.ts +661 -0
- package/test/batch-many-to-many-regression.test.ts +573 -0
- package/test/branchService.test.ts +367 -0
- package/test/data-transformer-hardening.test.ts +417 -0
- package/test/data-transformer.test.ts +175 -0
- package/test/doctor.test.ts +182 -0
- package/test/drizzle-conditions.test.ts +895 -0
- package/test/entityService.errors.test.ts +367 -0
- package/test/entityService.relations.test.ts +1008 -0
- package/test/entityService.subcollection-search.test.ts +566 -0
- package/test/entityService.test.ts +1035 -0
- package/test/generate-drizzle-schema.test.ts +988 -0
- package/test/historyService.test.ts +141 -0
- package/test/introspect-db-generation.test.ts +436 -0
- package/test/introspect-db-utils.test.ts +389 -0
- package/test/n-plus-one-regression.test.ts +314 -0
- package/test/postgresDataDriver.test.ts +648 -0
- package/test/realtimeService.test.ts +307 -0
- package/test/relation-pipeline-gaps.test.ts +637 -0
- package/test/relations.test.ts +1115 -0
- package/test/unmapped-tables-safety.test.ts +345 -0
- package/test-drizzle-bug.ts +18 -0
- package/test-drizzle-out/0000_cultured_freak.sql +7 -0
- package/test-drizzle-out/0001_tiresome_professor_monster.sql +1 -0
- package/test-drizzle-out/meta/0000_snapshot.json +55 -0
- package/test-drizzle-out/meta/0001_snapshot.json +63 -0
- package/test-drizzle-out/meta/_journal.json +20 -0
- package/test-drizzle-prompt.sh +2 -0
- package/test-policy-prompt.sh +3 -0
- package/test-programmatic.ts +30 -0
- package/test-programmatic2.ts +59 -0
- package/test-schema-no-policies.ts +12 -0
- package/test_drizzle_mock.js +3 -0
- package/test_find_changed.mjs +32 -0
- package/test_hash.js +14 -0
- package/test_output.txt +3145 -0
- package/tsconfig.json +49 -0
- package/tsconfig.prod.json +20 -0
- package/vite.config.ts +82 -0
package/jest-all.log
ADDED
|
@@ -0,0 +1,3128 @@
|
|
|
1
|
+
|
|
2
|
+
> @rebasepro/server-postgresql@0.0.1 test /Users/francesco/rebase/packages/server-postgresql
|
|
3
|
+
> jest --passWithNoTests
|
|
4
|
+
|
|
5
|
+
PASS test/drizzle-conditions.test.ts
|
|
6
|
+
β Console
|
|
7
|
+
|
|
8
|
+
console.debug
|
|
9
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
10
|
+
relationName: 'tags',
|
|
11
|
+
cardinality: 'many',
|
|
12
|
+
direction: 'owning',
|
|
13
|
+
hasThrough: true,
|
|
14
|
+
hasForeignKeyOnTarget: false,
|
|
15
|
+
inverseRelationName: undefined,
|
|
16
|
+
parentEntityId: 1
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
20
|
+
|
|
21
|
+
console.debug
|
|
22
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
23
|
+
|
|
24
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
25
|
+
|
|
26
|
+
console.debug
|
|
27
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
28
|
+
|
|
29
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
30
|
+
|
|
31
|
+
console.debug
|
|
32
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
33
|
+
relationName: 'tags',
|
|
34
|
+
cardinality: 'many',
|
|
35
|
+
direction: 'owning',
|
|
36
|
+
hasThrough: true,
|
|
37
|
+
hasForeignKeyOnTarget: false,
|
|
38
|
+
inverseRelationName: undefined,
|
|
39
|
+
parentEntityId: [ 1, 2, 3 ]
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
43
|
+
|
|
44
|
+
console.debug
|
|
45
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
46
|
+
|
|
47
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
48
|
+
|
|
49
|
+
console.debug
|
|
50
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
51
|
+
|
|
52
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
53
|
+
|
|
54
|
+
console.debug
|
|
55
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
56
|
+
relationName: 'posts',
|
|
57
|
+
cardinality: 'many',
|
|
58
|
+
direction: 'inverse',
|
|
59
|
+
hasThrough: true,
|
|
60
|
+
hasForeignKeyOnTarget: false,
|
|
61
|
+
inverseRelationName: undefined,
|
|
62
|
+
parentEntityId: 20
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
66
|
+
|
|
67
|
+
console.debug
|
|
68
|
+
π [buildRelationConditions] Using inverse many-to-many with explicit through
|
|
69
|
+
|
|
70
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:150:21)
|
|
71
|
+
|
|
72
|
+
console.debug
|
|
73
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
74
|
+
|
|
75
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
76
|
+
|
|
77
|
+
console.debug
|
|
78
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
79
|
+
relationName: 'posts',
|
|
80
|
+
cardinality: 'many',
|
|
81
|
+
direction: 'inverse',
|
|
82
|
+
hasThrough: true,
|
|
83
|
+
hasForeignKeyOnTarget: false,
|
|
84
|
+
inverseRelationName: undefined,
|
|
85
|
+
parentEntityId: [ 20, 21, 22 ]
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
89
|
+
|
|
90
|
+
console.debug
|
|
91
|
+
π [buildRelationConditions] Using inverse many-to-many with explicit through
|
|
92
|
+
|
|
93
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:150:21)
|
|
94
|
+
|
|
95
|
+
console.debug
|
|
96
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
97
|
+
|
|
98
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
99
|
+
|
|
100
|
+
console.debug
|
|
101
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
102
|
+
relationName: 'tags_via_join',
|
|
103
|
+
cardinality: 'many',
|
|
104
|
+
direction: 'inverse',
|
|
105
|
+
hasThrough: false,
|
|
106
|
+
hasForeignKeyOnTarget: false,
|
|
107
|
+
inverseRelationName: undefined,
|
|
108
|
+
parentEntityId: 1
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
112
|
+
|
|
113
|
+
console.debug
|
|
114
|
+
π [buildRelationConditions] Using joinPath logic
|
|
115
|
+
|
|
116
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:121:21)
|
|
117
|
+
|
|
118
|
+
console.debug
|
|
119
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 2, whereConditionsCount: 1 }
|
|
120
|
+
|
|
121
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
122
|
+
|
|
123
|
+
console.debug
|
|
124
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
125
|
+
relationName: 'missing_relation',
|
|
126
|
+
cardinality: 'one',
|
|
127
|
+
direction: 'inverse',
|
|
128
|
+
hasThrough: false,
|
|
129
|
+
hasForeignKeyOnTarget: false,
|
|
130
|
+
inverseRelationName: undefined,
|
|
131
|
+
parentEntityId: 1
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
135
|
+
|
|
136
|
+
console.debug
|
|
137
|
+
π [buildRelationConditions] Using joinPath logic
|
|
138
|
+
|
|
139
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:121:21)
|
|
140
|
+
|
|
141
|
+
console.debug
|
|
142
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
143
|
+
relationName: 'author_tags',
|
|
144
|
+
cardinality: 'many',
|
|
145
|
+
direction: 'inverse',
|
|
146
|
+
hasThrough: false,
|
|
147
|
+
hasForeignKeyOnTarget: false,
|
|
148
|
+
inverseRelationName: undefined,
|
|
149
|
+
parentEntityId: 1
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
153
|
+
|
|
154
|
+
console.debug
|
|
155
|
+
π [buildRelationConditions] Using joinPath logic
|
|
156
|
+
|
|
157
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:121:21)
|
|
158
|
+
|
|
159
|
+
console.debug
|
|
160
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 2, whereConditionsCount: 1 }
|
|
161
|
+
|
|
162
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
163
|
+
|
|
164
|
+
console.debug
|
|
165
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
166
|
+
relationName: 'test_junction',
|
|
167
|
+
cardinality: 'many',
|
|
168
|
+
direction: 'inverse',
|
|
169
|
+
hasThrough: false,
|
|
170
|
+
hasForeignKeyOnTarget: false,
|
|
171
|
+
inverseRelationName: undefined,
|
|
172
|
+
parentEntityId: 1
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
176
|
+
|
|
177
|
+
console.debug
|
|
178
|
+
π [buildRelationConditions] Using joinPath logic
|
|
179
|
+
|
|
180
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:121:21)
|
|
181
|
+
|
|
182
|
+
console.debug
|
|
183
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
184
|
+
|
|
185
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
186
|
+
|
|
187
|
+
console.debug
|
|
188
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
189
|
+
relationName: 'posts',
|
|
190
|
+
cardinality: 'many',
|
|
191
|
+
direction: 'inverse',
|
|
192
|
+
hasThrough: true,
|
|
193
|
+
hasForeignKeyOnTarget: false,
|
|
194
|
+
inverseRelationName: undefined,
|
|
195
|
+
parentEntityId: 20
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
199
|
+
|
|
200
|
+
console.debug
|
|
201
|
+
π [buildRelationConditions] Using inverse many-to-many with explicit through
|
|
202
|
+
|
|
203
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:150:21)
|
|
204
|
+
|
|
205
|
+
console.debug
|
|
206
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
207
|
+
relationName: 'posts',
|
|
208
|
+
cardinality: 'many',
|
|
209
|
+
direction: 'inverse',
|
|
210
|
+
hasThrough: true,
|
|
211
|
+
hasForeignKeyOnTarget: false,
|
|
212
|
+
inverseRelationName: undefined,
|
|
213
|
+
parentEntityId: 20
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
217
|
+
|
|
218
|
+
console.debug
|
|
219
|
+
π [buildRelationConditions] Using inverse many-to-many with explicit through
|
|
220
|
+
|
|
221
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:150:21)
|
|
222
|
+
|
|
223
|
+
console.debug
|
|
224
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
225
|
+
relationName: 'posts',
|
|
226
|
+
cardinality: 'many',
|
|
227
|
+
direction: 'inverse',
|
|
228
|
+
hasThrough: true,
|
|
229
|
+
hasForeignKeyOnTarget: false,
|
|
230
|
+
inverseRelationName: undefined,
|
|
231
|
+
parentEntityId: 20
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
235
|
+
|
|
236
|
+
console.debug
|
|
237
|
+
π [buildRelationConditions] Using inverse many-to-many with explicit through
|
|
238
|
+
|
|
239
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:150:21)
|
|
240
|
+
|
|
241
|
+
console.debug
|
|
242
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
243
|
+
relationName: 'tags',
|
|
244
|
+
cardinality: 'many',
|
|
245
|
+
direction: 'owning',
|
|
246
|
+
hasThrough: true,
|
|
247
|
+
hasForeignKeyOnTarget: false,
|
|
248
|
+
inverseRelationName: undefined,
|
|
249
|
+
parentEntityId: 1
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
253
|
+
|
|
254
|
+
console.debug
|
|
255
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
256
|
+
|
|
257
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
258
|
+
|
|
259
|
+
console.debug
|
|
260
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
261
|
+
|
|
262
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
263
|
+
|
|
264
|
+
console.debug
|
|
265
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
266
|
+
relationName: 'posts',
|
|
267
|
+
cardinality: 'many',
|
|
268
|
+
direction: 'inverse',
|
|
269
|
+
hasThrough: true,
|
|
270
|
+
hasForeignKeyOnTarget: false,
|
|
271
|
+
inverseRelationName: undefined,
|
|
272
|
+
parentEntityId: 20
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
276
|
+
|
|
277
|
+
console.debug
|
|
278
|
+
π [buildRelationConditions] Using inverse many-to-many with explicit through
|
|
279
|
+
|
|
280
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:150:21)
|
|
281
|
+
|
|
282
|
+
console.debug
|
|
283
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
284
|
+
|
|
285
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
286
|
+
|
|
287
|
+
console.debug
|
|
288
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
289
|
+
relationName: 'posts',
|
|
290
|
+
cardinality: 'many',
|
|
291
|
+
direction: 'inverse',
|
|
292
|
+
hasThrough: true,
|
|
293
|
+
hasForeignKeyOnTarget: false,
|
|
294
|
+
inverseRelationName: undefined,
|
|
295
|
+
parentEntityId: 20
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
299
|
+
|
|
300
|
+
console.debug
|
|
301
|
+
π [buildRelationConditions] Using inverse many-to-many with explicit through
|
|
302
|
+
|
|
303
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:150:21)
|
|
304
|
+
|
|
305
|
+
console.debug
|
|
306
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
307
|
+
|
|
308
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
309
|
+
|
|
310
|
+
console.debug
|
|
311
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
312
|
+
relationName: 'posts',
|
|
313
|
+
cardinality: 'many',
|
|
314
|
+
direction: 'inverse',
|
|
315
|
+
hasThrough: false,
|
|
316
|
+
hasForeignKeyOnTarget: true,
|
|
317
|
+
inverseRelationName: 'tags',
|
|
318
|
+
parentEntityId: 23
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
322
|
+
|
|
323
|
+
console.debug
|
|
324
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
325
|
+
|
|
326
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
327
|
+
|
|
328
|
+
console.debug
|
|
329
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'posts' with inverseRelationName 'tags'
|
|
330
|
+
|
|
331
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
332
|
+
|
|
333
|
+
console.debug
|
|
334
|
+
π [findCorrespondingJunctionTable] Target collection: posts
|
|
335
|
+
|
|
336
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:947:21)
|
|
337
|
+
|
|
338
|
+
console.debug
|
|
339
|
+
π [findCorrespondingJunctionTable] Target collection relations: [ 'tags' ]
|
|
340
|
+
|
|
341
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:951:21)
|
|
342
|
+
|
|
343
|
+
console.debug
|
|
344
|
+
π [findCorrespondingJunctionTable] Found relation: {
|
|
345
|
+
relationName: 'tags',
|
|
346
|
+
cardinality: 'many',
|
|
347
|
+
direction: 'owning',
|
|
348
|
+
hasThrough: true
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:961:21)
|
|
352
|
+
|
|
353
|
+
console.debug
|
|
354
|
+
π [findCorrespondingJunctionTable] Found matching owning relation with junction table!
|
|
355
|
+
|
|
356
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:976:21)
|
|
357
|
+
|
|
358
|
+
console.debug
|
|
359
|
+
π [findCorrespondingJunctionTable] Returning junction info: {
|
|
360
|
+
table: 'posts_tags',
|
|
361
|
+
sourceColumn: 'tag_id',
|
|
362
|
+
targetColumn: 'post_id'
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:986:21)
|
|
366
|
+
|
|
367
|
+
console.debug
|
|
368
|
+
π [buildRelationConditions] Found junction info for inverse many-to-many, building junction conditions
|
|
369
|
+
|
|
370
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:167:25)
|
|
371
|
+
|
|
372
|
+
console.debug
|
|
373
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
374
|
+
|
|
375
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
376
|
+
|
|
377
|
+
console.debug
|
|
378
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
379
|
+
relationName: 'posts',
|
|
380
|
+
cardinality: 'many',
|
|
381
|
+
direction: 'inverse',
|
|
382
|
+
hasThrough: false,
|
|
383
|
+
hasForeignKeyOnTarget: false,
|
|
384
|
+
inverseRelationName: 'tags',
|
|
385
|
+
parentEntityId: 5
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
389
|
+
|
|
390
|
+
console.debug
|
|
391
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
392
|
+
|
|
393
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
394
|
+
|
|
395
|
+
console.debug
|
|
396
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'posts' with inverseRelationName 'tags'
|
|
397
|
+
|
|
398
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
399
|
+
|
|
400
|
+
console.debug
|
|
401
|
+
π [findCorrespondingJunctionTable] Target collection: posts
|
|
402
|
+
|
|
403
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:947:21)
|
|
404
|
+
|
|
405
|
+
console.debug
|
|
406
|
+
π [findCorrespondingJunctionTable] Target collection relations: [ 'tags' ]
|
|
407
|
+
|
|
408
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:951:21)
|
|
409
|
+
|
|
410
|
+
console.debug
|
|
411
|
+
π [findCorrespondingJunctionTable] Found relation: {
|
|
412
|
+
relationName: 'tags',
|
|
413
|
+
cardinality: 'many',
|
|
414
|
+
direction: 'owning',
|
|
415
|
+
hasThrough: true
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:961:21)
|
|
419
|
+
|
|
420
|
+
console.debug
|
|
421
|
+
π [findCorrespondingJunctionTable] Found matching owning relation with junction table!
|
|
422
|
+
|
|
423
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:976:21)
|
|
424
|
+
|
|
425
|
+
console.debug
|
|
426
|
+
π [findCorrespondingJunctionTable] Returning junction info: {
|
|
427
|
+
table: 'posts_tags',
|
|
428
|
+
sourceColumn: 'tag_id',
|
|
429
|
+
targetColumn: 'post_id'
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:986:21)
|
|
433
|
+
|
|
434
|
+
console.debug
|
|
435
|
+
π [buildRelationConditions] Found junction info for inverse many-to-many, building junction conditions
|
|
436
|
+
|
|
437
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:167:25)
|
|
438
|
+
|
|
439
|
+
console.debug
|
|
440
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
441
|
+
|
|
442
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
443
|
+
|
|
444
|
+
console.debug
|
|
445
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
446
|
+
relationName: 'posts',
|
|
447
|
+
cardinality: 'many',
|
|
448
|
+
direction: 'inverse',
|
|
449
|
+
hasThrough: false,
|
|
450
|
+
hasForeignKeyOnTarget: false,
|
|
451
|
+
inverseRelationName: 'tags',
|
|
452
|
+
parentEntityId: 42
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
456
|
+
|
|
457
|
+
console.debug
|
|
458
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
459
|
+
|
|
460
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
461
|
+
|
|
462
|
+
console.debug
|
|
463
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'posts' with inverseRelationName 'tags'
|
|
464
|
+
|
|
465
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
466
|
+
|
|
467
|
+
console.debug
|
|
468
|
+
π [findCorrespondingJunctionTable] Target collection: posts
|
|
469
|
+
|
|
470
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:947:21)
|
|
471
|
+
|
|
472
|
+
console.debug
|
|
473
|
+
π [findCorrespondingJunctionTable] Target collection relations: [ 'tags' ]
|
|
474
|
+
|
|
475
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:951:21)
|
|
476
|
+
|
|
477
|
+
console.debug
|
|
478
|
+
π [findCorrespondingJunctionTable] Found relation: {
|
|
479
|
+
relationName: 'tags',
|
|
480
|
+
cardinality: 'many',
|
|
481
|
+
direction: 'owning',
|
|
482
|
+
hasThrough: true
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:961:21)
|
|
486
|
+
|
|
487
|
+
console.debug
|
|
488
|
+
π [findCorrespondingJunctionTable] Found matching owning relation with junction table!
|
|
489
|
+
|
|
490
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:976:21)
|
|
491
|
+
|
|
492
|
+
console.debug
|
|
493
|
+
π [findCorrespondingJunctionTable] Returning junction info: {
|
|
494
|
+
table: 'posts_tags',
|
|
495
|
+
sourceColumn: 'tag_id',
|
|
496
|
+
targetColumn: 'post_id'
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:986:21)
|
|
500
|
+
|
|
501
|
+
console.debug
|
|
502
|
+
π [buildRelationConditions] Found junction info for inverse many-to-many, building junction conditions
|
|
503
|
+
|
|
504
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:167:25)
|
|
505
|
+
|
|
506
|
+
console.debug
|
|
507
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
508
|
+
|
|
509
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
510
|
+
|
|
511
|
+
console.debug
|
|
512
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
513
|
+
relationName: 'posts',
|
|
514
|
+
cardinality: 'many',
|
|
515
|
+
direction: 'inverse',
|
|
516
|
+
hasThrough: false,
|
|
517
|
+
hasForeignKeyOnTarget: false,
|
|
518
|
+
inverseRelationName: 'nonexistent',
|
|
519
|
+
parentEntityId: 5
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
523
|
+
|
|
524
|
+
console.debug
|
|
525
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
526
|
+
|
|
527
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
528
|
+
|
|
529
|
+
console.debug
|
|
530
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'posts' with inverseRelationName 'nonexistent'
|
|
531
|
+
|
|
532
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
533
|
+
|
|
534
|
+
console.debug
|
|
535
|
+
π [findCorrespondingJunctionTable] Target collection: posts
|
|
536
|
+
|
|
537
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:947:21)
|
|
538
|
+
|
|
539
|
+
console.debug
|
|
540
|
+
π [findCorrespondingJunctionTable] Target collection relations: []
|
|
541
|
+
|
|
542
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:951:21)
|
|
543
|
+
|
|
544
|
+
console.debug
|
|
545
|
+
π [findCorrespondingJunctionTable] No relation found with key 'nonexistent' on target collection
|
|
546
|
+
|
|
547
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:957:25)
|
|
548
|
+
|
|
549
|
+
console.error
|
|
550
|
+
π [buildRelationConditions] Failed to find junction table info and no foreign key specified
|
|
551
|
+
|
|
552
|
+
185 | whereConditions.push(simpleCondition);
|
|
553
|
+
186 | } else {
|
|
554
|
+
> 187 | console.error(`π [buildRelationConditions] Failed to find junction table info and no foreign key specified`);
|
|
555
|
+
| ^
|
|
556
|
+
188 | throw new Error(`Cannot resolve inverse many relation '${relation.relationName}'. Either specify 'through' property, ensure corresponding owning relation exists with junction table configuration, or specify 'foreignKeyOnTarget' for one-to-many relationships.`);
|
|
557
|
+
189 | }
|
|
558
|
+
190 | } else {
|
|
559
|
+
|
|
560
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:187:25)
|
|
561
|
+
at test/drizzle-conditions.test.ts:805:41
|
|
562
|
+
at Object.<anonymous> (../../node_modules/expect/build/toThrowMatchers.js:74:11)
|
|
563
|
+
at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)
|
|
564
|
+
at Object.<anonymous> (test/drizzle-conditions.test.ts:814:16)
|
|
565
|
+
|
|
566
|
+
console.debug
|
|
567
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
568
|
+
relationName: 'posts',
|
|
569
|
+
cardinality: 'many',
|
|
570
|
+
direction: 'inverse',
|
|
571
|
+
hasThrough: false,
|
|
572
|
+
hasForeignKeyOnTarget: false,
|
|
573
|
+
inverseRelationName: 'tags',
|
|
574
|
+
parentEntityId: 7
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
578
|
+
|
|
579
|
+
console.debug
|
|
580
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
581
|
+
|
|
582
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
583
|
+
|
|
584
|
+
console.debug
|
|
585
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'posts' with inverseRelationName 'tags'
|
|
586
|
+
|
|
587
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
588
|
+
|
|
589
|
+
console.debug
|
|
590
|
+
π [findCorrespondingJunctionTable] Target collection: posts
|
|
591
|
+
|
|
592
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:947:21)
|
|
593
|
+
|
|
594
|
+
console.debug
|
|
595
|
+
π [findCorrespondingJunctionTable] Target collection relations: [ 'tags' ]
|
|
596
|
+
|
|
597
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:951:21)
|
|
598
|
+
|
|
599
|
+
console.debug
|
|
600
|
+
π [findCorrespondingJunctionTable] Found relation: {
|
|
601
|
+
relationName: 'tags',
|
|
602
|
+
cardinality: 'many',
|
|
603
|
+
direction: 'owning',
|
|
604
|
+
hasThrough: true
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:961:21)
|
|
608
|
+
|
|
609
|
+
console.debug
|
|
610
|
+
π [findCorrespondingJunctionTable] Found matching owning relation with junction table!
|
|
611
|
+
|
|
612
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:976:21)
|
|
613
|
+
|
|
614
|
+
console.debug
|
|
615
|
+
π [findCorrespondingJunctionTable] Returning junction info: {
|
|
616
|
+
table: 'posts_tags',
|
|
617
|
+
sourceColumn: 'tag_id',
|
|
618
|
+
targetColumn: 'post_id'
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:986:21)
|
|
622
|
+
|
|
623
|
+
console.debug
|
|
624
|
+
π [buildRelationConditions] Found junction info for inverse many-to-many, building junction conditions
|
|
625
|
+
|
|
626
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:167:25)
|
|
627
|
+
|
|
628
|
+
console.debug
|
|
629
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
630
|
+
|
|
631
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
632
|
+
|
|
633
|
+
console.debug
|
|
634
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
635
|
+
relationName: 'posts',
|
|
636
|
+
cardinality: 'many',
|
|
637
|
+
direction: 'inverse',
|
|
638
|
+
hasThrough: false,
|
|
639
|
+
hasForeignKeyOnTarget: false,
|
|
640
|
+
inverseRelationName: undefined,
|
|
641
|
+
parentEntityId: 5
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
645
|
+
|
|
646
|
+
console.debug
|
|
647
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
648
|
+
|
|
649
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
650
|
+
|
|
651
|
+
console.debug
|
|
652
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'posts' with inverseRelationName 'undefined'
|
|
653
|
+
|
|
654
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
655
|
+
|
|
656
|
+
console.debug
|
|
657
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
658
|
+
|
|
659
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
660
|
+
|
|
661
|
+
console.error
|
|
662
|
+
π [buildRelationConditions] Failed to find junction table info and no foreign key specified
|
|
663
|
+
|
|
664
|
+
185 | whereConditions.push(simpleCondition);
|
|
665
|
+
186 | } else {
|
|
666
|
+
> 187 | console.error(`π [buildRelationConditions] Failed to find junction table info and no foreign key specified`);
|
|
667
|
+
| ^
|
|
668
|
+
188 | throw new Error(`Cannot resolve inverse many relation '${relation.relationName}'. Either specify 'through' property, ensure corresponding owning relation exists with junction table configuration, or specify 'foreignKeyOnTarget' for one-to-many relationships.`);
|
|
669
|
+
189 | }
|
|
670
|
+
190 | } else {
|
|
671
|
+
|
|
672
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:187:25)
|
|
673
|
+
at test/drizzle-conditions.test.ts:883:41
|
|
674
|
+
at Object.<anonymous> (../../node_modules/expect/build/toThrowMatchers.js:74:11)
|
|
675
|
+
at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)
|
|
676
|
+
at Object.<anonymous> (test/drizzle-conditions.test.ts:892:16)
|
|
677
|
+
|
|
678
|
+
PASS test/postgresDataDriver.test.ts
|
|
679
|
+
β Console
|
|
680
|
+
|
|
681
|
+
console.warn
|
|
682
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'test-user', email: 'test@example.com' }
|
|
683
|
+
|
|
684
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
685
|
+
902 | if (!this.user?.roles) {
|
|
686
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
687
|
+
| ^
|
|
688
|
+
904 | }
|
|
689
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
690
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
691
|
+
|
|
692
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
693
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:61:30)
|
|
694
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
695
|
+
at AuthenticatedPostgresBackendDriver.fetchCollection (src/PostgresBackendDriver.ts:944:21)
|
|
696
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:66:32)
|
|
697
|
+
|
|
698
|
+
console.warn
|
|
699
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'test-user-123', email: 'test@example.com' }
|
|
700
|
+
|
|
701
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
702
|
+
902 | if (!this.user?.roles) {
|
|
703
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
704
|
+
| ^
|
|
705
|
+
904 | }
|
|
706
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
707
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
708
|
+
|
|
709
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
710
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:77:30)
|
|
711
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
712
|
+
at AuthenticatedPostgresBackendDriver.fetchCollection (src/PostgresBackendDriver.ts:944:21)
|
|
713
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:82:32)
|
|
714
|
+
|
|
715
|
+
console.warn
|
|
716
|
+
[DataDriver] User ID (uid) is missing for authenticated delegate. Using 'anonymous'. User object: {}
|
|
717
|
+
|
|
718
|
+
895 | let userId = this.user?.uid;
|
|
719
|
+
896 | if (!userId) {
|
|
720
|
+
> 897 | console.warn(`[DataDriver] User ID (uid) is missing for authenticated delegate. Using 'anonymous'. User object:`, this.user);
|
|
721
|
+
| ^
|
|
722
|
+
898 | userId = 'anonymous';
|
|
723
|
+
899 | }
|
|
724
|
+
900 |
|
|
725
|
+
|
|
726
|
+
at src/PostgresBackendDriver.ts:897:25
|
|
727
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:138:24)
|
|
728
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
729
|
+
at AuthenticatedPostgresBackendDriver.fetchCollection (src/PostgresBackendDriver.ts:944:21)
|
|
730
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:144:32)
|
|
731
|
+
|
|
732
|
+
console.warn
|
|
733
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: {}
|
|
734
|
+
|
|
735
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
736
|
+
902 | if (!this.user?.roles) {
|
|
737
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
738
|
+
| ^
|
|
739
|
+
904 | }
|
|
740
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
741
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
742
|
+
|
|
743
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
744
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:138:24)
|
|
745
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
746
|
+
at AuthenticatedPostgresBackendDriver.fetchCollection (src/PostgresBackendDriver.ts:944:21)
|
|
747
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:144:32)
|
|
748
|
+
|
|
749
|
+
console.warn
|
|
750
|
+
[DataDriver] User ID (uid) is missing for authenticated delegate. Using 'anonymous'. User object: {}
|
|
751
|
+
|
|
752
|
+
895 | let userId = this.user?.uid;
|
|
753
|
+
896 | if (!userId) {
|
|
754
|
+
> 897 | console.warn(`[DataDriver] User ID (uid) is missing for authenticated delegate. Using 'anonymous'. User object:`, this.user);
|
|
755
|
+
| ^
|
|
756
|
+
898 | userId = 'anonymous';
|
|
757
|
+
899 | }
|
|
758
|
+
900 |
|
|
759
|
+
|
|
760
|
+
at src/PostgresBackendDriver.ts:897:25
|
|
761
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:150:19)
|
|
762
|
+
|
|
763
|
+
console.warn
|
|
764
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: {}
|
|
765
|
+
|
|
766
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
767
|
+
902 | if (!this.user?.roles) {
|
|
768
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
769
|
+
| ^
|
|
770
|
+
904 | }
|
|
771
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
772
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
773
|
+
|
|
774
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
775
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:150:19)
|
|
776
|
+
|
|
777
|
+
console.warn
|
|
778
|
+
[DataDriver] User ID (uid) is missing for authenticated delegate. Using 'anonymous'. User object: null
|
|
779
|
+
|
|
780
|
+
895 | let userId = this.user?.uid;
|
|
781
|
+
896 | if (!userId) {
|
|
782
|
+
> 897 | console.warn(`[DataDriver] User ID (uid) is missing for authenticated delegate. Using 'anonymous'. User object:`, this.user);
|
|
783
|
+
| ^
|
|
784
|
+
898 | userId = 'anonymous';
|
|
785
|
+
899 | }
|
|
786
|
+
900 |
|
|
787
|
+
|
|
788
|
+
at src/PostgresBackendDriver.ts:897:25
|
|
789
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:163:24)
|
|
790
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
791
|
+
at AuthenticatedPostgresBackendDriver.fetchCollection (src/PostgresBackendDriver.ts:944:21)
|
|
792
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:168:32)
|
|
793
|
+
|
|
794
|
+
console.warn
|
|
795
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: null
|
|
796
|
+
|
|
797
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
798
|
+
902 | if (!this.user?.roles) {
|
|
799
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
800
|
+
| ^
|
|
801
|
+
904 | }
|
|
802
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
803
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
804
|
+
|
|
805
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
806
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:163:24)
|
|
807
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
808
|
+
at AuthenticatedPostgresBackendDriver.fetchCollection (src/PostgresBackendDriver.ts:944:21)
|
|
809
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:168:32)
|
|
810
|
+
|
|
811
|
+
console.warn
|
|
812
|
+
[DataDriver] User ID (uid) is missing for authenticated delegate. Using 'anonymous'. User object: null
|
|
813
|
+
|
|
814
|
+
895 | let userId = this.user?.uid;
|
|
815
|
+
896 | if (!userId) {
|
|
816
|
+
> 897 | console.warn(`[DataDriver] User ID (uid) is missing for authenticated delegate. Using 'anonymous'. User object:`, this.user);
|
|
817
|
+
| ^
|
|
818
|
+
898 | userId = 'anonymous';
|
|
819
|
+
899 | }
|
|
820
|
+
900 |
|
|
821
|
+
|
|
822
|
+
at src/PostgresBackendDriver.ts:897:25
|
|
823
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:172:19)
|
|
824
|
+
|
|
825
|
+
console.warn
|
|
826
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: null
|
|
827
|
+
|
|
828
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
829
|
+
902 | if (!this.user?.roles) {
|
|
830
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
831
|
+
| ^
|
|
832
|
+
904 | }
|
|
833
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
834
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
835
|
+
|
|
836
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
837
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:172:19)
|
|
838
|
+
|
|
839
|
+
console.warn
|
|
840
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'test-user', email: 'test@example.com' }
|
|
841
|
+
|
|
842
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
843
|
+
902 | if (!this.user?.roles) {
|
|
844
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
845
|
+
| ^
|
|
846
|
+
904 | }
|
|
847
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
848
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
849
|
+
|
|
850
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
851
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:194:30)
|
|
852
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
853
|
+
at AuthenticatedPostgresBackendDriver.saveEntity (src/PostgresBackendDriver.ts:974:21)
|
|
854
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:207:32)
|
|
855
|
+
|
|
856
|
+
console.warn
|
|
857
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'test-user', email: 'test@example.com' }
|
|
858
|
+
|
|
859
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
860
|
+
902 | if (!this.user?.roles) {
|
|
861
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
862
|
+
| ^
|
|
863
|
+
904 | }
|
|
864
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
865
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
866
|
+
|
|
867
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
868
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:222:30)
|
|
869
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
870
|
+
at AuthenticatedPostgresBackendDriver.saveEntity (src/PostgresBackendDriver.ts:974:21)
|
|
871
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:234:39)
|
|
872
|
+
|
|
873
|
+
console.warn
|
|
874
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'test-user', email: 'test@example.com' }
|
|
875
|
+
|
|
876
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
877
|
+
902 | if (!this.user?.roles) {
|
|
878
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
879
|
+
| ^
|
|
880
|
+
904 | }
|
|
881
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
882
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
883
|
+
|
|
884
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
885
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:246:30)
|
|
886
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
887
|
+
at AuthenticatedPostgresBackendDriver.saveEntity (src/PostgresBackendDriver.ts:974:21)
|
|
888
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:263:47)
|
|
889
|
+
|
|
890
|
+
console.error
|
|
891
|
+
[DataDriver] Error flushing deferred notification: Error: Network Failure on Notification
|
|
892
|
+
at Object.<anonymous> (/Users/francesco/rebase/packages/server-postgresql/test/postgresDataDriver.test.ts:260:45)
|
|
893
|
+
at Promise.then.completed (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:298:28)
|
|
894
|
+
at new Promise (<anonymous>)
|
|
895
|
+
at callAsyncCircusFn (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:231:10)
|
|
896
|
+
at _callCircusTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:316:40)
|
|
897
|
+
at _runTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:252:3)
|
|
898
|
+
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:126:9)
|
|
899
|
+
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:121:9)
|
|
900
|
+
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:121:9)
|
|
901
|
+
at run (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:71:3)
|
|
902
|
+
at runAndTransformResultsToJestFormat (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
|
|
903
|
+
at jestAdapter (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
|
|
904
|
+
at runTestInternal (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:367:16)
|
|
905
|
+
at runTest (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:444:34)
|
|
906
|
+
|
|
907
|
+
934 | );
|
|
908
|
+
935 | } catch (e) {
|
|
909
|
+
> 936 | console.error("[DataDriver] Error flushing deferred notification:", e);
|
|
910
|
+
| ^
|
|
911
|
+
937 | }
|
|
912
|
+
938 | }
|
|
913
|
+
939 |
|
|
914
|
+
|
|
915
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:936:25)
|
|
916
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:263:28)
|
|
917
|
+
|
|
918
|
+
console.warn
|
|
919
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'test-user', email: 'test@example.com' }
|
|
920
|
+
|
|
921
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
922
|
+
902 | if (!this.user?.roles) {
|
|
923
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
924
|
+
| ^
|
|
925
|
+
904 | }
|
|
926
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
927
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
928
|
+
|
|
929
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
930
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:277:30)
|
|
931
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:24)
|
|
932
|
+
at async Promise.all (index 0)
|
|
933
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:293:13)
|
|
934
|
+
|
|
935
|
+
console.warn
|
|
936
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'test-user', email: 'test@example.com' }
|
|
937
|
+
|
|
938
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
939
|
+
902 | if (!this.user?.roles) {
|
|
940
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
941
|
+
| ^
|
|
942
|
+
904 | }
|
|
943
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
944
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
945
|
+
|
|
946
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
947
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:277:30)
|
|
948
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:24)
|
|
949
|
+
at async Promise.all (index 1)
|
|
950
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:293:13)
|
|
951
|
+
|
|
952
|
+
console.warn
|
|
953
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: "admin'; DROP TABLE users; --", email: 'hacker@evil.com' }
|
|
954
|
+
|
|
955
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
956
|
+
902 | if (!this.user?.roles) {
|
|
957
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
958
|
+
| ^
|
|
959
|
+
904 | }
|
|
960
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
961
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
962
|
+
|
|
963
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
964
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:422:30)
|
|
965
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
966
|
+
at AuthenticatedPostgresBackendDriver.fetchCollection (src/PostgresBackendDriver.ts:944:21)
|
|
967
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:427:32)
|
|
968
|
+
|
|
969
|
+
console.warn
|
|
970
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'deleter', email: 'del@test.com' }
|
|
971
|
+
|
|
972
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
973
|
+
902 | if (!this.user?.roles) {
|
|
974
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
975
|
+
| ^
|
|
976
|
+
904 | }
|
|
977
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
978
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
979
|
+
|
|
980
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
981
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:478:30)
|
|
982
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
983
|
+
at AuthenticatedPostgresBackendDriver.deleteEntity (src/PostgresBackendDriver.ts:978:21)
|
|
984
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:483:32)
|
|
985
|
+
|
|
986
|
+
console.warn
|
|
987
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'checker', email: 'c@test.com' }
|
|
988
|
+
|
|
989
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
990
|
+
902 | if (!this.user?.roles) {
|
|
991
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
992
|
+
| ^
|
|
993
|
+
904 | }
|
|
994
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
995
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
996
|
+
|
|
997
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
998
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:490:30)
|
|
999
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
1000
|
+
at AuthenticatedPostgresBackendDriver.checkUniqueField (src/PostgresBackendDriver.ts:988:21)
|
|
1001
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:495:47)
|
|
1002
|
+
|
|
1003
|
+
console.warn
|
|
1004
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'counter', email: 'c@test.com' }
|
|
1005
|
+
|
|
1006
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
1007
|
+
902 | if (!this.user?.roles) {
|
|
1008
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
1009
|
+
| ^
|
|
1010
|
+
904 | }
|
|
1011
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
1012
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
1013
|
+
|
|
1014
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
1015
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:503:30)
|
|
1016
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
1017
|
+
at AuthenticatedPostgresBackendDriver.countEntities (src/PostgresBackendDriver.ts:992:21)
|
|
1018
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:508:47)
|
|
1019
|
+
|
|
1020
|
+
console.warn
|
|
1021
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'u1', email: 'u@t.com' }
|
|
1022
|
+
|
|
1023
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
1024
|
+
902 | if (!this.user?.roles) {
|
|
1025
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
1026
|
+
| ^
|
|
1027
|
+
904 | }
|
|
1028
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
1029
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
1030
|
+
|
|
1031
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
1032
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:534:86)
|
|
1033
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
1034
|
+
at AuthenticatedPostgresBackendDriver.saveEntity (src/PostgresBackendDriver.ts:974:21)
|
|
1035
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:546:32)
|
|
1036
|
+
|
|
1037
|
+
console.warn
|
|
1038
|
+
[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object: { uid: 'u1', email: 'u@t.com' }
|
|
1039
|
+
|
|
1040
|
+
901 | let userRoles = this.user?.roles ?? [];
|
|
1041
|
+
902 | if (!this.user?.roles) {
|
|
1042
|
+
> 903 | console.warn(`[DataDriver] User roles are missing for authenticated delegate. Using empty array. User object:`, this.user);
|
|
1043
|
+
| ^
|
|
1044
|
+
904 | }
|
|
1045
|
+
905 | const normalizedRoles = userRoles.map((r: unknown) =>
|
|
1046
|
+
906 | typeof r === "string" ? r : (r as Record<string, unknown>)?.id ?? String(r)
|
|
1047
|
+
|
|
1048
|
+
at src/PostgresBackendDriver.ts:903:25
|
|
1049
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:534:86)
|
|
1050
|
+
at AuthenticatedPostgresBackendDriver.withTransaction (src/PostgresBackendDriver.ts:894:47)
|
|
1051
|
+
at AuthenticatedPostgresBackendDriver.saveEntity (src/PostgresBackendDriver.ts:974:21)
|
|
1052
|
+
at Object.<anonymous> (test/postgresDataDriver.test.ts:547:32)
|
|
1053
|
+
|
|
1054
|
+
PASS test/entityService.test.ts
|
|
1055
|
+
β Console
|
|
1056
|
+
|
|
1057
|
+
console.debug
|
|
1058
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1059
|
+
relationName: 'tags',
|
|
1060
|
+
cardinality: 'many',
|
|
1061
|
+
direction: 'owning',
|
|
1062
|
+
hasThrough: true,
|
|
1063
|
+
hasForeignKeyOnTarget: false,
|
|
1064
|
+
inverseRelationName: undefined,
|
|
1065
|
+
parentEntityId: 2
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1069
|
+
at Array.map (<anonymous>)
|
|
1070
|
+
|
|
1071
|
+
console.debug
|
|
1072
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
1073
|
+
|
|
1074
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
1075
|
+
at Array.map (<anonymous>)
|
|
1076
|
+
|
|
1077
|
+
console.debug
|
|
1078
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
1079
|
+
|
|
1080
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1081
|
+
at Array.map (<anonymous>)
|
|
1082
|
+
|
|
1083
|
+
console.debug
|
|
1084
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1085
|
+
relationName: 'tags',
|
|
1086
|
+
cardinality: 'many',
|
|
1087
|
+
direction: 'owning',
|
|
1088
|
+
hasThrough: true,
|
|
1089
|
+
hasForeignKeyOnTarget: false,
|
|
1090
|
+
inverseRelationName: undefined,
|
|
1091
|
+
parentEntityId: 4
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1095
|
+
at Array.map (<anonymous>)
|
|
1096
|
+
|
|
1097
|
+
console.debug
|
|
1098
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
1099
|
+
|
|
1100
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
1101
|
+
at Array.map (<anonymous>)
|
|
1102
|
+
|
|
1103
|
+
console.debug
|
|
1104
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
1105
|
+
|
|
1106
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1107
|
+
at Array.map (<anonymous>)
|
|
1108
|
+
|
|
1109
|
+
console.debug
|
|
1110
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1111
|
+
relationName: 'author',
|
|
1112
|
+
cardinality: 'one',
|
|
1113
|
+
direction: 'owning',
|
|
1114
|
+
hasThrough: false,
|
|
1115
|
+
hasForeignKeyOnTarget: false,
|
|
1116
|
+
inverseRelationName: undefined,
|
|
1117
|
+
parentEntityId: 5
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1121
|
+
at Array.map (<anonymous>)
|
|
1122
|
+
|
|
1123
|
+
console.debug
|
|
1124
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
1125
|
+
|
|
1126
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
1127
|
+
at Array.map (<anonymous>)
|
|
1128
|
+
|
|
1129
|
+
console.debug
|
|
1130
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1131
|
+
|
|
1132
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1133
|
+
at Array.map (<anonymous>)
|
|
1134
|
+
|
|
1135
|
+
console.debug
|
|
1136
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1137
|
+
relationName: 'tags',
|
|
1138
|
+
cardinality: 'many',
|
|
1139
|
+
direction: 'owning',
|
|
1140
|
+
hasThrough: true,
|
|
1141
|
+
hasForeignKeyOnTarget: false,
|
|
1142
|
+
inverseRelationName: undefined,
|
|
1143
|
+
parentEntityId: 5
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1147
|
+
at Array.map (<anonymous>)
|
|
1148
|
+
|
|
1149
|
+
console.debug
|
|
1150
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
1151
|
+
|
|
1152
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
1153
|
+
at Array.map (<anonymous>)
|
|
1154
|
+
|
|
1155
|
+
console.debug
|
|
1156
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
1157
|
+
|
|
1158
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1159
|
+
at Array.map (<anonymous>)
|
|
1160
|
+
|
|
1161
|
+
console.debug
|
|
1162
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1163
|
+
relationName: 'posts',
|
|
1164
|
+
cardinality: 'many',
|
|
1165
|
+
direction: 'inverse',
|
|
1166
|
+
hasThrough: false,
|
|
1167
|
+
hasForeignKeyOnTarget: true,
|
|
1168
|
+
inverseRelationName: undefined,
|
|
1169
|
+
parentEntityId: '1'
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1173
|
+
|
|
1174
|
+
console.debug
|
|
1175
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1176
|
+
|
|
1177
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1178
|
+
|
|
1179
|
+
console.debug
|
|
1180
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'posts' with inverseRelationName 'undefined'
|
|
1181
|
+
|
|
1182
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1183
|
+
|
|
1184
|
+
console.debug
|
|
1185
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1186
|
+
|
|
1187
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1188
|
+
|
|
1189
|
+
console.debug
|
|
1190
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1191
|
+
|
|
1192
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1193
|
+
|
|
1194
|
+
console.debug
|
|
1195
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1196
|
+
|
|
1197
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1198
|
+
|
|
1199
|
+
console.debug
|
|
1200
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1201
|
+
relationName: 'companies',
|
|
1202
|
+
cardinality: 'many',
|
|
1203
|
+
direction: 'inverse',
|
|
1204
|
+
hasThrough: false,
|
|
1205
|
+
hasForeignKeyOnTarget: true,
|
|
1206
|
+
inverseRelationName: undefined,
|
|
1207
|
+
parentEntityId: 123
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1211
|
+
at Array.map (<anonymous>)
|
|
1212
|
+
|
|
1213
|
+
console.debug
|
|
1214
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1215
|
+
|
|
1216
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1217
|
+
at Array.map (<anonymous>)
|
|
1218
|
+
|
|
1219
|
+
console.debug
|
|
1220
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'companies' with inverseRelationName 'undefined'
|
|
1221
|
+
|
|
1222
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1223
|
+
at Array.map (<anonymous>)
|
|
1224
|
+
|
|
1225
|
+
console.debug
|
|
1226
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1227
|
+
|
|
1228
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1229
|
+
at Array.map (<anonymous>)
|
|
1230
|
+
|
|
1231
|
+
console.debug
|
|
1232
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1233
|
+
|
|
1234
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1235
|
+
at Array.map (<anonymous>)
|
|
1236
|
+
|
|
1237
|
+
console.debug
|
|
1238
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1239
|
+
|
|
1240
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1241
|
+
at Array.map (<anonymous>)
|
|
1242
|
+
|
|
1243
|
+
console.debug
|
|
1244
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1245
|
+
relationName: 'companies',
|
|
1246
|
+
cardinality: 'many',
|
|
1247
|
+
direction: 'inverse',
|
|
1248
|
+
hasThrough: false,
|
|
1249
|
+
hasForeignKeyOnTarget: true,
|
|
1250
|
+
inverseRelationName: undefined,
|
|
1251
|
+
parentEntityId: 'uuid-123'
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1255
|
+
at Array.map (<anonymous>)
|
|
1256
|
+
|
|
1257
|
+
console.debug
|
|
1258
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1259
|
+
|
|
1260
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1261
|
+
at Array.map (<anonymous>)
|
|
1262
|
+
|
|
1263
|
+
console.debug
|
|
1264
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'companies' with inverseRelationName 'undefined'
|
|
1265
|
+
|
|
1266
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1267
|
+
at Array.map (<anonymous>)
|
|
1268
|
+
|
|
1269
|
+
console.debug
|
|
1270
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1271
|
+
|
|
1272
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1273
|
+
at Array.map (<anonymous>)
|
|
1274
|
+
|
|
1275
|
+
console.debug
|
|
1276
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1277
|
+
|
|
1278
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1279
|
+
at Array.map (<anonymous>)
|
|
1280
|
+
|
|
1281
|
+
console.debug
|
|
1282
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1283
|
+
|
|
1284
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1285
|
+
at Array.map (<anonymous>)
|
|
1286
|
+
|
|
1287
|
+
console.debug
|
|
1288
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1289
|
+
relationName: 'project',
|
|
1290
|
+
cardinality: 'one',
|
|
1291
|
+
direction: 'owning',
|
|
1292
|
+
hasThrough: false,
|
|
1293
|
+
hasForeignKeyOnTarget: false,
|
|
1294
|
+
inverseRelationName: undefined,
|
|
1295
|
+
parentEntityId: '1'
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1299
|
+
at Array.map (<anonymous>)
|
|
1300
|
+
|
|
1301
|
+
console.debug
|
|
1302
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
1303
|
+
|
|
1304
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
1305
|
+
at Array.map (<anonymous>)
|
|
1306
|
+
|
|
1307
|
+
console.debug
|
|
1308
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1309
|
+
|
|
1310
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1311
|
+
at Array.map (<anonymous>)
|
|
1312
|
+
|
|
1313
|
+
console.debug
|
|
1314
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1315
|
+
relationName: 'assignee',
|
|
1316
|
+
cardinality: 'one',
|
|
1317
|
+
direction: 'owning',
|
|
1318
|
+
hasThrough: false,
|
|
1319
|
+
hasForeignKeyOnTarget: false,
|
|
1320
|
+
inverseRelationName: undefined,
|
|
1321
|
+
parentEntityId: '1'
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1325
|
+
at Array.map (<anonymous>)
|
|
1326
|
+
|
|
1327
|
+
console.debug
|
|
1328
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
1329
|
+
|
|
1330
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
1331
|
+
at Array.map (<anonymous>)
|
|
1332
|
+
|
|
1333
|
+
console.debug
|
|
1334
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1335
|
+
|
|
1336
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1337
|
+
at Array.map (<anonymous>)
|
|
1338
|
+
|
|
1339
|
+
console.debug
|
|
1340
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1341
|
+
relationName: 'company',
|
|
1342
|
+
cardinality: 'one',
|
|
1343
|
+
direction: 'owning',
|
|
1344
|
+
hasThrough: false,
|
|
1345
|
+
hasForeignKeyOnTarget: false,
|
|
1346
|
+
inverseRelationName: undefined,
|
|
1347
|
+
parentEntityId: [ '1', '2' ]
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1351
|
+
|
|
1352
|
+
console.debug
|
|
1353
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
1354
|
+
|
|
1355
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
1356
|
+
|
|
1357
|
+
console.debug
|
|
1358
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1359
|
+
|
|
1360
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1361
|
+
|
|
1362
|
+
console.debug
|
|
1363
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1364
|
+
relationName: 'tasks',
|
|
1365
|
+
cardinality: 'many',
|
|
1366
|
+
direction: 'inverse',
|
|
1367
|
+
hasThrough: false,
|
|
1368
|
+
hasForeignKeyOnTarget: true,
|
|
1369
|
+
inverseRelationName: undefined,
|
|
1370
|
+
parentEntityId: '1'
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1374
|
+
at Array.map (<anonymous>)
|
|
1375
|
+
at Array.map (<anonymous>)
|
|
1376
|
+
|
|
1377
|
+
console.debug
|
|
1378
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1379
|
+
|
|
1380
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1381
|
+
at Array.map (<anonymous>)
|
|
1382
|
+
at Array.map (<anonymous>)
|
|
1383
|
+
|
|
1384
|
+
console.debug
|
|
1385
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
1386
|
+
|
|
1387
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1388
|
+
at Array.map (<anonymous>)
|
|
1389
|
+
at Array.map (<anonymous>)
|
|
1390
|
+
|
|
1391
|
+
console.debug
|
|
1392
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1393
|
+
|
|
1394
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1395
|
+
at Array.map (<anonymous>)
|
|
1396
|
+
at Array.map (<anonymous>)
|
|
1397
|
+
|
|
1398
|
+
console.debug
|
|
1399
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1400
|
+
|
|
1401
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1402
|
+
at Array.map (<anonymous>)
|
|
1403
|
+
at Array.map (<anonymous>)
|
|
1404
|
+
|
|
1405
|
+
console.debug
|
|
1406
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1407
|
+
|
|
1408
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1409
|
+
at Array.map (<anonymous>)
|
|
1410
|
+
at Array.map (<anonymous>)
|
|
1411
|
+
|
|
1412
|
+
console.debug
|
|
1413
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1414
|
+
relationName: 'tags',
|
|
1415
|
+
cardinality: 'many',
|
|
1416
|
+
direction: 'owning',
|
|
1417
|
+
hasThrough: true,
|
|
1418
|
+
hasForeignKeyOnTarget: false,
|
|
1419
|
+
inverseRelationName: undefined,
|
|
1420
|
+
parentEntityId: '1'
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1424
|
+
at Array.map (<anonymous>)
|
|
1425
|
+
at Array.map (<anonymous>)
|
|
1426
|
+
|
|
1427
|
+
console.debug
|
|
1428
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
1429
|
+
|
|
1430
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
1431
|
+
at Array.map (<anonymous>)
|
|
1432
|
+
at Array.map (<anonymous>)
|
|
1433
|
+
|
|
1434
|
+
console.debug
|
|
1435
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
1436
|
+
|
|
1437
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1438
|
+
at Array.map (<anonymous>)
|
|
1439
|
+
at Array.map (<anonymous>)
|
|
1440
|
+
|
|
1441
|
+
console.debug
|
|
1442
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1443
|
+
relationName: 'tasks',
|
|
1444
|
+
cardinality: 'many',
|
|
1445
|
+
direction: 'inverse',
|
|
1446
|
+
hasThrough: false,
|
|
1447
|
+
hasForeignKeyOnTarget: true,
|
|
1448
|
+
inverseRelationName: undefined,
|
|
1449
|
+
parentEntityId: '2'
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1453
|
+
at Array.map (<anonymous>)
|
|
1454
|
+
at Array.map (<anonymous>)
|
|
1455
|
+
|
|
1456
|
+
console.debug
|
|
1457
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1458
|
+
|
|
1459
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1460
|
+
at Array.map (<anonymous>)
|
|
1461
|
+
at Array.map (<anonymous>)
|
|
1462
|
+
|
|
1463
|
+
console.debug
|
|
1464
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
1465
|
+
|
|
1466
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1467
|
+
at Array.map (<anonymous>)
|
|
1468
|
+
at Array.map (<anonymous>)
|
|
1469
|
+
|
|
1470
|
+
console.debug
|
|
1471
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1472
|
+
|
|
1473
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1474
|
+
at Array.map (<anonymous>)
|
|
1475
|
+
at Array.map (<anonymous>)
|
|
1476
|
+
|
|
1477
|
+
console.debug
|
|
1478
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1479
|
+
|
|
1480
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1481
|
+
at Array.map (<anonymous>)
|
|
1482
|
+
at Array.map (<anonymous>)
|
|
1483
|
+
|
|
1484
|
+
console.debug
|
|
1485
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1486
|
+
|
|
1487
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1488
|
+
at Array.map (<anonymous>)
|
|
1489
|
+
at Array.map (<anonymous>)
|
|
1490
|
+
|
|
1491
|
+
console.debug
|
|
1492
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1493
|
+
relationName: 'tags',
|
|
1494
|
+
cardinality: 'many',
|
|
1495
|
+
direction: 'owning',
|
|
1496
|
+
hasThrough: true,
|
|
1497
|
+
hasForeignKeyOnTarget: false,
|
|
1498
|
+
inverseRelationName: undefined,
|
|
1499
|
+
parentEntityId: '2'
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1503
|
+
at Array.map (<anonymous>)
|
|
1504
|
+
at Array.map (<anonymous>)
|
|
1505
|
+
|
|
1506
|
+
console.debug
|
|
1507
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
1508
|
+
|
|
1509
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
1510
|
+
at Array.map (<anonymous>)
|
|
1511
|
+
at Array.map (<anonymous>)
|
|
1512
|
+
|
|
1513
|
+
console.debug
|
|
1514
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
1515
|
+
|
|
1516
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1517
|
+
at Array.map (<anonymous>)
|
|
1518
|
+
at Array.map (<anonymous>)
|
|
1519
|
+
|
|
1520
|
+
console.debug
|
|
1521
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1522
|
+
relationName: 'company',
|
|
1523
|
+
cardinality: 'one',
|
|
1524
|
+
direction: 'owning',
|
|
1525
|
+
hasThrough: false,
|
|
1526
|
+
hasForeignKeyOnTarget: false,
|
|
1527
|
+
inverseRelationName: undefined,
|
|
1528
|
+
parentEntityId: [ '2', '1' ]
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1532
|
+
|
|
1533
|
+
console.debug
|
|
1534
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
1535
|
+
|
|
1536
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
1537
|
+
|
|
1538
|
+
console.debug
|
|
1539
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1540
|
+
|
|
1541
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1542
|
+
|
|
1543
|
+
console.debug
|
|
1544
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1545
|
+
relationName: 'tasks',
|
|
1546
|
+
cardinality: 'many',
|
|
1547
|
+
direction: 'inverse',
|
|
1548
|
+
hasThrough: false,
|
|
1549
|
+
hasForeignKeyOnTarget: true,
|
|
1550
|
+
inverseRelationName: undefined,
|
|
1551
|
+
parentEntityId: '2'
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1555
|
+
at Array.map (<anonymous>)
|
|
1556
|
+
at Array.map (<anonymous>)
|
|
1557
|
+
|
|
1558
|
+
console.debug
|
|
1559
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1560
|
+
|
|
1561
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1562
|
+
at Array.map (<anonymous>)
|
|
1563
|
+
at Array.map (<anonymous>)
|
|
1564
|
+
|
|
1565
|
+
console.debug
|
|
1566
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
1567
|
+
|
|
1568
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1569
|
+
at Array.map (<anonymous>)
|
|
1570
|
+
at Array.map (<anonymous>)
|
|
1571
|
+
|
|
1572
|
+
console.debug
|
|
1573
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1574
|
+
|
|
1575
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1576
|
+
at Array.map (<anonymous>)
|
|
1577
|
+
at Array.map (<anonymous>)
|
|
1578
|
+
|
|
1579
|
+
console.debug
|
|
1580
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1581
|
+
|
|
1582
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1583
|
+
at Array.map (<anonymous>)
|
|
1584
|
+
at Array.map (<anonymous>)
|
|
1585
|
+
|
|
1586
|
+
console.debug
|
|
1587
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1588
|
+
|
|
1589
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1590
|
+
at Array.map (<anonymous>)
|
|
1591
|
+
at Array.map (<anonymous>)
|
|
1592
|
+
|
|
1593
|
+
console.debug
|
|
1594
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1595
|
+
relationName: 'tags',
|
|
1596
|
+
cardinality: 'many',
|
|
1597
|
+
direction: 'owning',
|
|
1598
|
+
hasThrough: true,
|
|
1599
|
+
hasForeignKeyOnTarget: false,
|
|
1600
|
+
inverseRelationName: undefined,
|
|
1601
|
+
parentEntityId: '2'
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1605
|
+
at Array.map (<anonymous>)
|
|
1606
|
+
at Array.map (<anonymous>)
|
|
1607
|
+
|
|
1608
|
+
console.debug
|
|
1609
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
1610
|
+
|
|
1611
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
1612
|
+
at Array.map (<anonymous>)
|
|
1613
|
+
at Array.map (<anonymous>)
|
|
1614
|
+
|
|
1615
|
+
console.debug
|
|
1616
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
1617
|
+
|
|
1618
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1619
|
+
at Array.map (<anonymous>)
|
|
1620
|
+
at Array.map (<anonymous>)
|
|
1621
|
+
|
|
1622
|
+
console.debug
|
|
1623
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1624
|
+
relationName: 'tasks',
|
|
1625
|
+
cardinality: 'many',
|
|
1626
|
+
direction: 'inverse',
|
|
1627
|
+
hasThrough: false,
|
|
1628
|
+
hasForeignKeyOnTarget: true,
|
|
1629
|
+
inverseRelationName: undefined,
|
|
1630
|
+
parentEntityId: '1'
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1634
|
+
at Array.map (<anonymous>)
|
|
1635
|
+
at Array.map (<anonymous>)
|
|
1636
|
+
|
|
1637
|
+
console.debug
|
|
1638
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1639
|
+
|
|
1640
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1641
|
+
at Array.map (<anonymous>)
|
|
1642
|
+
at Array.map (<anonymous>)
|
|
1643
|
+
|
|
1644
|
+
console.debug
|
|
1645
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
1646
|
+
|
|
1647
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1648
|
+
at Array.map (<anonymous>)
|
|
1649
|
+
at Array.map (<anonymous>)
|
|
1650
|
+
|
|
1651
|
+
console.debug
|
|
1652
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1653
|
+
|
|
1654
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1655
|
+
at Array.map (<anonymous>)
|
|
1656
|
+
at Array.map (<anonymous>)
|
|
1657
|
+
|
|
1658
|
+
console.debug
|
|
1659
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1660
|
+
|
|
1661
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1662
|
+
at Array.map (<anonymous>)
|
|
1663
|
+
at Array.map (<anonymous>)
|
|
1664
|
+
|
|
1665
|
+
console.debug
|
|
1666
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1667
|
+
|
|
1668
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1669
|
+
at Array.map (<anonymous>)
|
|
1670
|
+
at Array.map (<anonymous>)
|
|
1671
|
+
|
|
1672
|
+
console.debug
|
|
1673
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1674
|
+
relationName: 'tags',
|
|
1675
|
+
cardinality: 'many',
|
|
1676
|
+
direction: 'owning',
|
|
1677
|
+
hasThrough: true,
|
|
1678
|
+
hasForeignKeyOnTarget: false,
|
|
1679
|
+
inverseRelationName: undefined,
|
|
1680
|
+
parentEntityId: '1'
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1684
|
+
at Array.map (<anonymous>)
|
|
1685
|
+
at Array.map (<anonymous>)
|
|
1686
|
+
|
|
1687
|
+
console.debug
|
|
1688
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
1689
|
+
|
|
1690
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
1691
|
+
at Array.map (<anonymous>)
|
|
1692
|
+
at Array.map (<anonymous>)
|
|
1693
|
+
|
|
1694
|
+
console.debug
|
|
1695
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
1696
|
+
|
|
1697
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1698
|
+
at Array.map (<anonymous>)
|
|
1699
|
+
at Array.map (<anonymous>)
|
|
1700
|
+
|
|
1701
|
+
console.debug
|
|
1702
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1703
|
+
relationName: 'company',
|
|
1704
|
+
cardinality: 'one',
|
|
1705
|
+
direction: 'owning',
|
|
1706
|
+
hasThrough: false,
|
|
1707
|
+
hasForeignKeyOnTarget: false,
|
|
1708
|
+
inverseRelationName: undefined,
|
|
1709
|
+
parentEntityId: [ '1', '2' ]
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1713
|
+
|
|
1714
|
+
console.debug
|
|
1715
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
1716
|
+
|
|
1717
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
1718
|
+
|
|
1719
|
+
console.debug
|
|
1720
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1721
|
+
|
|
1722
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1723
|
+
|
|
1724
|
+
console.debug
|
|
1725
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1726
|
+
relationName: 'tasks',
|
|
1727
|
+
cardinality: 'many',
|
|
1728
|
+
direction: 'inverse',
|
|
1729
|
+
hasThrough: false,
|
|
1730
|
+
hasForeignKeyOnTarget: true,
|
|
1731
|
+
inverseRelationName: undefined,
|
|
1732
|
+
parentEntityId: '1'
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1736
|
+
at Array.map (<anonymous>)
|
|
1737
|
+
at Array.map (<anonymous>)
|
|
1738
|
+
|
|
1739
|
+
console.debug
|
|
1740
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1741
|
+
|
|
1742
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1743
|
+
at Array.map (<anonymous>)
|
|
1744
|
+
at Array.map (<anonymous>)
|
|
1745
|
+
|
|
1746
|
+
console.debug
|
|
1747
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
1748
|
+
|
|
1749
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1750
|
+
at Array.map (<anonymous>)
|
|
1751
|
+
at Array.map (<anonymous>)
|
|
1752
|
+
|
|
1753
|
+
console.debug
|
|
1754
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1755
|
+
|
|
1756
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1757
|
+
at Array.map (<anonymous>)
|
|
1758
|
+
at Array.map (<anonymous>)
|
|
1759
|
+
|
|
1760
|
+
console.debug
|
|
1761
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1762
|
+
|
|
1763
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1764
|
+
at Array.map (<anonymous>)
|
|
1765
|
+
at Array.map (<anonymous>)
|
|
1766
|
+
|
|
1767
|
+
console.debug
|
|
1768
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1769
|
+
|
|
1770
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1771
|
+
at Array.map (<anonymous>)
|
|
1772
|
+
at Array.map (<anonymous>)
|
|
1773
|
+
|
|
1774
|
+
console.debug
|
|
1775
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1776
|
+
relationName: 'tags',
|
|
1777
|
+
cardinality: 'many',
|
|
1778
|
+
direction: 'owning',
|
|
1779
|
+
hasThrough: true,
|
|
1780
|
+
hasForeignKeyOnTarget: false,
|
|
1781
|
+
inverseRelationName: undefined,
|
|
1782
|
+
parentEntityId: '1'
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1786
|
+
at Array.map (<anonymous>)
|
|
1787
|
+
at Array.map (<anonymous>)
|
|
1788
|
+
|
|
1789
|
+
console.debug
|
|
1790
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
1791
|
+
|
|
1792
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
1793
|
+
at Array.map (<anonymous>)
|
|
1794
|
+
at Array.map (<anonymous>)
|
|
1795
|
+
|
|
1796
|
+
console.debug
|
|
1797
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
1798
|
+
|
|
1799
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1800
|
+
at Array.map (<anonymous>)
|
|
1801
|
+
at Array.map (<anonymous>)
|
|
1802
|
+
|
|
1803
|
+
console.debug
|
|
1804
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1805
|
+
relationName: 'tasks',
|
|
1806
|
+
cardinality: 'many',
|
|
1807
|
+
direction: 'inverse',
|
|
1808
|
+
hasThrough: false,
|
|
1809
|
+
hasForeignKeyOnTarget: true,
|
|
1810
|
+
inverseRelationName: undefined,
|
|
1811
|
+
parentEntityId: '2'
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1815
|
+
at Array.map (<anonymous>)
|
|
1816
|
+
at Array.map (<anonymous>)
|
|
1817
|
+
|
|
1818
|
+
console.debug
|
|
1819
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1820
|
+
|
|
1821
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1822
|
+
at Array.map (<anonymous>)
|
|
1823
|
+
at Array.map (<anonymous>)
|
|
1824
|
+
|
|
1825
|
+
console.debug
|
|
1826
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
1827
|
+
|
|
1828
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1829
|
+
at Array.map (<anonymous>)
|
|
1830
|
+
at Array.map (<anonymous>)
|
|
1831
|
+
|
|
1832
|
+
console.debug
|
|
1833
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1834
|
+
|
|
1835
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1836
|
+
at Array.map (<anonymous>)
|
|
1837
|
+
at Array.map (<anonymous>)
|
|
1838
|
+
|
|
1839
|
+
console.debug
|
|
1840
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1841
|
+
|
|
1842
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1843
|
+
at Array.map (<anonymous>)
|
|
1844
|
+
at Array.map (<anonymous>)
|
|
1845
|
+
|
|
1846
|
+
console.debug
|
|
1847
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1848
|
+
|
|
1849
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1850
|
+
at Array.map (<anonymous>)
|
|
1851
|
+
at Array.map (<anonymous>)
|
|
1852
|
+
|
|
1853
|
+
console.debug
|
|
1854
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1855
|
+
relationName: 'tags',
|
|
1856
|
+
cardinality: 'many',
|
|
1857
|
+
direction: 'owning',
|
|
1858
|
+
hasThrough: true,
|
|
1859
|
+
hasForeignKeyOnTarget: false,
|
|
1860
|
+
inverseRelationName: undefined,
|
|
1861
|
+
parentEntityId: '2'
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1865
|
+
at Array.map (<anonymous>)
|
|
1866
|
+
at Array.map (<anonymous>)
|
|
1867
|
+
|
|
1868
|
+
console.debug
|
|
1869
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
1870
|
+
|
|
1871
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
1872
|
+
at Array.map (<anonymous>)
|
|
1873
|
+
at Array.map (<anonymous>)
|
|
1874
|
+
|
|
1875
|
+
console.debug
|
|
1876
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
1877
|
+
|
|
1878
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1879
|
+
at Array.map (<anonymous>)
|
|
1880
|
+
at Array.map (<anonymous>)
|
|
1881
|
+
|
|
1882
|
+
console.debug
|
|
1883
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1884
|
+
relationName: 'tasks',
|
|
1885
|
+
cardinality: 'many',
|
|
1886
|
+
direction: 'inverse',
|
|
1887
|
+
hasThrough: false,
|
|
1888
|
+
hasForeignKeyOnTarget: true,
|
|
1889
|
+
inverseRelationName: undefined,
|
|
1890
|
+
parentEntityId: '1'
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1894
|
+
|
|
1895
|
+
console.debug
|
|
1896
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1897
|
+
|
|
1898
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1899
|
+
|
|
1900
|
+
console.debug
|
|
1901
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
1902
|
+
|
|
1903
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1904
|
+
|
|
1905
|
+
console.debug
|
|
1906
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1907
|
+
|
|
1908
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1909
|
+
|
|
1910
|
+
console.debug
|
|
1911
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1912
|
+
|
|
1913
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1914
|
+
|
|
1915
|
+
console.debug
|
|
1916
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1917
|
+
|
|
1918
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1919
|
+
|
|
1920
|
+
console.debug
|
|
1921
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1922
|
+
relationName: 'children',
|
|
1923
|
+
cardinality: 'many',
|
|
1924
|
+
direction: 'inverse',
|
|
1925
|
+
hasThrough: false,
|
|
1926
|
+
hasForeignKeyOnTarget: true,
|
|
1927
|
+
inverseRelationName: undefined,
|
|
1928
|
+
parentEntityId: '1'
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1932
|
+
|
|
1933
|
+
console.debug
|
|
1934
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1935
|
+
|
|
1936
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1937
|
+
|
|
1938
|
+
console.debug
|
|
1939
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'children' with inverseRelationName 'undefined'
|
|
1940
|
+
|
|
1941
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1942
|
+
|
|
1943
|
+
console.debug
|
|
1944
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1945
|
+
|
|
1946
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1947
|
+
|
|
1948
|
+
console.debug
|
|
1949
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1950
|
+
|
|
1951
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1952
|
+
|
|
1953
|
+
console.debug
|
|
1954
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1955
|
+
|
|
1956
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
1957
|
+
|
|
1958
|
+
console.debug
|
|
1959
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
1960
|
+
relationName: 'tasks',
|
|
1961
|
+
cardinality: 'many',
|
|
1962
|
+
direction: 'inverse',
|
|
1963
|
+
hasThrough: false,
|
|
1964
|
+
hasForeignKeyOnTarget: true,
|
|
1965
|
+
inverseRelationName: undefined,
|
|
1966
|
+
parentEntityId: '5'
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
1970
|
+
at Array.map (<anonymous>)
|
|
1971
|
+
|
|
1972
|
+
console.debug
|
|
1973
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
1974
|
+
|
|
1975
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
1976
|
+
at Array.map (<anonymous>)
|
|
1977
|
+
|
|
1978
|
+
console.debug
|
|
1979
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
1980
|
+
|
|
1981
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
1982
|
+
at Array.map (<anonymous>)
|
|
1983
|
+
|
|
1984
|
+
console.debug
|
|
1985
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
1986
|
+
|
|
1987
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
1988
|
+
at Array.map (<anonymous>)
|
|
1989
|
+
|
|
1990
|
+
console.debug
|
|
1991
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
1992
|
+
|
|
1993
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
1994
|
+
at Array.map (<anonymous>)
|
|
1995
|
+
|
|
1996
|
+
console.debug
|
|
1997
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
1998
|
+
|
|
1999
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2000
|
+
at Array.map (<anonymous>)
|
|
2001
|
+
|
|
2002
|
+
console.debug
|
|
2003
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2004
|
+
relationName: 'tags',
|
|
2005
|
+
cardinality: 'many',
|
|
2006
|
+
direction: 'owning',
|
|
2007
|
+
hasThrough: true,
|
|
2008
|
+
hasForeignKeyOnTarget: false,
|
|
2009
|
+
inverseRelationName: undefined,
|
|
2010
|
+
parentEntityId: '5'
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2014
|
+
at Array.map (<anonymous>)
|
|
2015
|
+
|
|
2016
|
+
console.debug
|
|
2017
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2018
|
+
|
|
2019
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2020
|
+
at Array.map (<anonymous>)
|
|
2021
|
+
|
|
2022
|
+
console.debug
|
|
2023
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2024
|
+
|
|
2025
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2026
|
+
at Array.map (<anonymous>)
|
|
2027
|
+
|
|
2028
|
+
console.debug
|
|
2029
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2030
|
+
relationName: 'project',
|
|
2031
|
+
cardinality: 'one',
|
|
2032
|
+
direction: 'owning',
|
|
2033
|
+
hasThrough: false,
|
|
2034
|
+
hasForeignKeyOnTarget: false,
|
|
2035
|
+
inverseRelationName: undefined,
|
|
2036
|
+
parentEntityId: '1'
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2040
|
+
at Array.map (<anonymous>)
|
|
2041
|
+
|
|
2042
|
+
console.debug
|
|
2043
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
2044
|
+
|
|
2045
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
2046
|
+
at Array.map (<anonymous>)
|
|
2047
|
+
|
|
2048
|
+
console.debug
|
|
2049
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2050
|
+
|
|
2051
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2052
|
+
at Array.map (<anonymous>)
|
|
2053
|
+
|
|
2054
|
+
console.debug
|
|
2055
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2056
|
+
relationName: 'project',
|
|
2057
|
+
cardinality: 'one',
|
|
2058
|
+
direction: 'owning',
|
|
2059
|
+
hasThrough: false,
|
|
2060
|
+
hasForeignKeyOnTarget: false,
|
|
2061
|
+
inverseRelationName: undefined,
|
|
2062
|
+
parentEntityId: '1'
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2066
|
+
at Array.map (<anonymous>)
|
|
2067
|
+
|
|
2068
|
+
console.debug
|
|
2069
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
2070
|
+
|
|
2071
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
2072
|
+
at Array.map (<anonymous>)
|
|
2073
|
+
|
|
2074
|
+
console.debug
|
|
2075
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2076
|
+
|
|
2077
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2078
|
+
at Array.map (<anonymous>)
|
|
2079
|
+
|
|
2080
|
+
console.debug
|
|
2081
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2082
|
+
relationName: 'assignee',
|
|
2083
|
+
cardinality: 'one',
|
|
2084
|
+
direction: 'owning',
|
|
2085
|
+
hasThrough: false,
|
|
2086
|
+
hasForeignKeyOnTarget: false,
|
|
2087
|
+
inverseRelationName: undefined,
|
|
2088
|
+
parentEntityId: '1'
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2092
|
+
at Array.map (<anonymous>)
|
|
2093
|
+
|
|
2094
|
+
console.debug
|
|
2095
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
2096
|
+
|
|
2097
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
2098
|
+
at Array.map (<anonymous>)
|
|
2099
|
+
|
|
2100
|
+
console.debug
|
|
2101
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2102
|
+
|
|
2103
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2104
|
+
at Array.map (<anonymous>)
|
|
2105
|
+
|
|
2106
|
+
console.debug
|
|
2107
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2108
|
+
relationName: 'company',
|
|
2109
|
+
cardinality: 'one',
|
|
2110
|
+
direction: 'owning',
|
|
2111
|
+
hasThrough: false,
|
|
2112
|
+
hasForeignKeyOnTarget: false,
|
|
2113
|
+
inverseRelationName: undefined,
|
|
2114
|
+
parentEntityId: [ '1' ]
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2118
|
+
|
|
2119
|
+
console.debug
|
|
2120
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
2121
|
+
|
|
2122
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
2123
|
+
|
|
2124
|
+
console.debug
|
|
2125
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2126
|
+
|
|
2127
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2128
|
+
|
|
2129
|
+
console.debug
|
|
2130
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2131
|
+
relationName: 'tasks',
|
|
2132
|
+
cardinality: 'many',
|
|
2133
|
+
direction: 'inverse',
|
|
2134
|
+
hasThrough: false,
|
|
2135
|
+
hasForeignKeyOnTarget: true,
|
|
2136
|
+
inverseRelationName: undefined,
|
|
2137
|
+
parentEntityId: '1'
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2141
|
+
at Array.map (<anonymous>)
|
|
2142
|
+
at Array.map (<anonymous>)
|
|
2143
|
+
|
|
2144
|
+
console.debug
|
|
2145
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
2146
|
+
|
|
2147
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
2148
|
+
at Array.map (<anonymous>)
|
|
2149
|
+
at Array.map (<anonymous>)
|
|
2150
|
+
|
|
2151
|
+
console.debug
|
|
2152
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
2153
|
+
|
|
2154
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
2155
|
+
at Array.map (<anonymous>)
|
|
2156
|
+
at Array.map (<anonymous>)
|
|
2157
|
+
|
|
2158
|
+
console.debug
|
|
2159
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
2160
|
+
|
|
2161
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
2162
|
+
at Array.map (<anonymous>)
|
|
2163
|
+
at Array.map (<anonymous>)
|
|
2164
|
+
|
|
2165
|
+
console.debug
|
|
2166
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
2167
|
+
|
|
2168
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
2169
|
+
at Array.map (<anonymous>)
|
|
2170
|
+
at Array.map (<anonymous>)
|
|
2171
|
+
|
|
2172
|
+
console.debug
|
|
2173
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2174
|
+
|
|
2175
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2176
|
+
at Array.map (<anonymous>)
|
|
2177
|
+
at Array.map (<anonymous>)
|
|
2178
|
+
|
|
2179
|
+
console.debug
|
|
2180
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2181
|
+
relationName: 'tags',
|
|
2182
|
+
cardinality: 'many',
|
|
2183
|
+
direction: 'owning',
|
|
2184
|
+
hasThrough: true,
|
|
2185
|
+
hasForeignKeyOnTarget: false,
|
|
2186
|
+
inverseRelationName: undefined,
|
|
2187
|
+
parentEntityId: '1'
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2191
|
+
at Array.map (<anonymous>)
|
|
2192
|
+
at Array.map (<anonymous>)
|
|
2193
|
+
|
|
2194
|
+
console.debug
|
|
2195
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2196
|
+
|
|
2197
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2198
|
+
at Array.map (<anonymous>)
|
|
2199
|
+
at Array.map (<anonymous>)
|
|
2200
|
+
|
|
2201
|
+
console.debug
|
|
2202
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2203
|
+
|
|
2204
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2205
|
+
at Array.map (<anonymous>)
|
|
2206
|
+
at Array.map (<anonymous>)
|
|
2207
|
+
|
|
2208
|
+
console.debug
|
|
2209
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2210
|
+
relationName: 'company',
|
|
2211
|
+
cardinality: 'one',
|
|
2212
|
+
direction: 'owning',
|
|
2213
|
+
hasThrough: false,
|
|
2214
|
+
hasForeignKeyOnTarget: false,
|
|
2215
|
+
inverseRelationName: undefined,
|
|
2216
|
+
parentEntityId: [ '1' ]
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2220
|
+
|
|
2221
|
+
console.debug
|
|
2222
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
2223
|
+
|
|
2224
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
2225
|
+
|
|
2226
|
+
console.debug
|
|
2227
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2228
|
+
|
|
2229
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2230
|
+
|
|
2231
|
+
console.debug
|
|
2232
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2233
|
+
relationName: 'tasks',
|
|
2234
|
+
cardinality: 'many',
|
|
2235
|
+
direction: 'inverse',
|
|
2236
|
+
hasThrough: false,
|
|
2237
|
+
hasForeignKeyOnTarget: true,
|
|
2238
|
+
inverseRelationName: undefined,
|
|
2239
|
+
parentEntityId: '1'
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2243
|
+
at Array.map (<anonymous>)
|
|
2244
|
+
at Array.map (<anonymous>)
|
|
2245
|
+
|
|
2246
|
+
console.debug
|
|
2247
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
2248
|
+
|
|
2249
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
2250
|
+
at Array.map (<anonymous>)
|
|
2251
|
+
at Array.map (<anonymous>)
|
|
2252
|
+
|
|
2253
|
+
console.debug
|
|
2254
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
2255
|
+
|
|
2256
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
2257
|
+
at Array.map (<anonymous>)
|
|
2258
|
+
at Array.map (<anonymous>)
|
|
2259
|
+
|
|
2260
|
+
console.debug
|
|
2261
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
2262
|
+
|
|
2263
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
2264
|
+
at Array.map (<anonymous>)
|
|
2265
|
+
at Array.map (<anonymous>)
|
|
2266
|
+
|
|
2267
|
+
console.debug
|
|
2268
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
2269
|
+
|
|
2270
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
2271
|
+
at Array.map (<anonymous>)
|
|
2272
|
+
at Array.map (<anonymous>)
|
|
2273
|
+
|
|
2274
|
+
console.debug
|
|
2275
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2276
|
+
|
|
2277
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2278
|
+
at Array.map (<anonymous>)
|
|
2279
|
+
at Array.map (<anonymous>)
|
|
2280
|
+
|
|
2281
|
+
console.debug
|
|
2282
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2283
|
+
relationName: 'tags',
|
|
2284
|
+
cardinality: 'many',
|
|
2285
|
+
direction: 'owning',
|
|
2286
|
+
hasThrough: true,
|
|
2287
|
+
hasForeignKeyOnTarget: false,
|
|
2288
|
+
inverseRelationName: undefined,
|
|
2289
|
+
parentEntityId: '1'
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2293
|
+
at Array.map (<anonymous>)
|
|
2294
|
+
at Array.map (<anonymous>)
|
|
2295
|
+
|
|
2296
|
+
console.debug
|
|
2297
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2298
|
+
|
|
2299
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2300
|
+
at Array.map (<anonymous>)
|
|
2301
|
+
at Array.map (<anonymous>)
|
|
2302
|
+
|
|
2303
|
+
console.debug
|
|
2304
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2305
|
+
|
|
2306
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2307
|
+
at Array.map (<anonymous>)
|
|
2308
|
+
at Array.map (<anonymous>)
|
|
2309
|
+
|
|
2310
|
+
console.debug
|
|
2311
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2312
|
+
relationName: 'companies',
|
|
2313
|
+
cardinality: 'many',
|
|
2314
|
+
direction: 'inverse',
|
|
2315
|
+
hasThrough: false,
|
|
2316
|
+
hasForeignKeyOnTarget: true,
|
|
2317
|
+
inverseRelationName: undefined,
|
|
2318
|
+
parentEntityId: 1
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2322
|
+
at Array.map (<anonymous>)
|
|
2323
|
+
|
|
2324
|
+
console.debug
|
|
2325
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
2326
|
+
|
|
2327
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
2328
|
+
at Array.map (<anonymous>)
|
|
2329
|
+
|
|
2330
|
+
console.debug
|
|
2331
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'companies' with inverseRelationName 'undefined'
|
|
2332
|
+
|
|
2333
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
2334
|
+
at Array.map (<anonymous>)
|
|
2335
|
+
|
|
2336
|
+
console.debug
|
|
2337
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
2338
|
+
|
|
2339
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
2340
|
+
at Array.map (<anonymous>)
|
|
2341
|
+
|
|
2342
|
+
console.debug
|
|
2343
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
2344
|
+
|
|
2345
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
2346
|
+
at Array.map (<anonymous>)
|
|
2347
|
+
|
|
2348
|
+
console.debug
|
|
2349
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2350
|
+
|
|
2351
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2352
|
+
at Array.map (<anonymous>)
|
|
2353
|
+
|
|
2354
|
+
console.debug
|
|
2355
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2356
|
+
relationName: 'companies',
|
|
2357
|
+
cardinality: 'many',
|
|
2358
|
+
direction: 'inverse',
|
|
2359
|
+
hasThrough: false,
|
|
2360
|
+
hasForeignKeyOnTarget: true,
|
|
2361
|
+
inverseRelationName: undefined,
|
|
2362
|
+
parentEntityId: 1
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2366
|
+
at Array.map (<anonymous>)
|
|
2367
|
+
|
|
2368
|
+
console.debug
|
|
2369
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
2370
|
+
|
|
2371
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
2372
|
+
at Array.map (<anonymous>)
|
|
2373
|
+
|
|
2374
|
+
console.debug
|
|
2375
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'companies' with inverseRelationName 'undefined'
|
|
2376
|
+
|
|
2377
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
2378
|
+
at Array.map (<anonymous>)
|
|
2379
|
+
|
|
2380
|
+
console.debug
|
|
2381
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
2382
|
+
|
|
2383
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
2384
|
+
at Array.map (<anonymous>)
|
|
2385
|
+
|
|
2386
|
+
console.debug
|
|
2387
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
2388
|
+
|
|
2389
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
2390
|
+
at Array.map (<anonymous>)
|
|
2391
|
+
|
|
2392
|
+
console.debug
|
|
2393
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2394
|
+
|
|
2395
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2396
|
+
at Array.map (<anonymous>)
|
|
2397
|
+
|
|
2398
|
+
console.debug
|
|
2399
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2400
|
+
relationName: 'company',
|
|
2401
|
+
cardinality: 'one',
|
|
2402
|
+
direction: 'owning',
|
|
2403
|
+
hasThrough: false,
|
|
2404
|
+
hasForeignKeyOnTarget: false,
|
|
2405
|
+
inverseRelationName: undefined,
|
|
2406
|
+
parentEntityId: '1'
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2410
|
+
at Array.map (<anonymous>)
|
|
2411
|
+
|
|
2412
|
+
console.debug
|
|
2413
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
2414
|
+
|
|
2415
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
2416
|
+
at Array.map (<anonymous>)
|
|
2417
|
+
|
|
2418
|
+
console.debug
|
|
2419
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2420
|
+
|
|
2421
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2422
|
+
at Array.map (<anonymous>)
|
|
2423
|
+
|
|
2424
|
+
console.debug
|
|
2425
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2426
|
+
relationName: 'tasks',
|
|
2427
|
+
cardinality: 'many',
|
|
2428
|
+
direction: 'inverse',
|
|
2429
|
+
hasThrough: false,
|
|
2430
|
+
hasForeignKeyOnTarget: true,
|
|
2431
|
+
inverseRelationName: undefined,
|
|
2432
|
+
parentEntityId: '1'
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2436
|
+
at Array.map (<anonymous>)
|
|
2437
|
+
|
|
2438
|
+
console.debug
|
|
2439
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
2440
|
+
|
|
2441
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
2442
|
+
at Array.map (<anonymous>)
|
|
2443
|
+
|
|
2444
|
+
console.debug
|
|
2445
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'tasks' with inverseRelationName 'undefined'
|
|
2446
|
+
|
|
2447
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
2448
|
+
at Array.map (<anonymous>)
|
|
2449
|
+
|
|
2450
|
+
console.debug
|
|
2451
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
2452
|
+
|
|
2453
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
2454
|
+
at Array.map (<anonymous>)
|
|
2455
|
+
|
|
2456
|
+
console.debug
|
|
2457
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
2458
|
+
|
|
2459
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
2460
|
+
at Array.map (<anonymous>)
|
|
2461
|
+
|
|
2462
|
+
console.debug
|
|
2463
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2464
|
+
|
|
2465
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2466
|
+
at Array.map (<anonymous>)
|
|
2467
|
+
|
|
2468
|
+
console.debug
|
|
2469
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2470
|
+
relationName: 'tags',
|
|
2471
|
+
cardinality: 'many',
|
|
2472
|
+
direction: 'owning',
|
|
2473
|
+
hasThrough: true,
|
|
2474
|
+
hasForeignKeyOnTarget: false,
|
|
2475
|
+
inverseRelationName: undefined,
|
|
2476
|
+
parentEntityId: '1'
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2480
|
+
at Array.map (<anonymous>)
|
|
2481
|
+
|
|
2482
|
+
console.debug
|
|
2483
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2484
|
+
|
|
2485
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2486
|
+
at Array.map (<anonymous>)
|
|
2487
|
+
|
|
2488
|
+
console.debug
|
|
2489
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2490
|
+
|
|
2491
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2492
|
+
at Array.map (<anonymous>)
|
|
2493
|
+
|
|
2494
|
+
PASS test/entityService.subcollection-search.test.ts
|
|
2495
|
+
β Console
|
|
2496
|
+
|
|
2497
|
+
console.warn
|
|
2498
|
+
Unrecognized relation format for property 'posts' in collection 'tags'
|
|
2499
|
+
|
|
2500
|
+
186 | const relation = (sourceCollection.relations ?? []).find((rel: Relation) => rel.relationName === property.relationName)
|
|
2501
|
+
187 | if (!relation) {
|
|
2502
|
+
> 188 | console.warn(`Unrecognized relation format for property '${propertyKey}' in collection '${sourceCollection.slug}'`);
|
|
2503
|
+
| ^
|
|
2504
|
+
189 | return undefined;
|
|
2505
|
+
190 | }
|
|
2506
|
+
191 |
|
|
2507
|
+
|
|
2508
|
+
at resolvePropertyRelation (../common/src/util/relations.ts:188:17)
|
|
2509
|
+
at ../common/src/util/relations.ts:154:30
|
|
2510
|
+
at Array.forEach (<anonymous>)
|
|
2511
|
+
at resolveCollectionRelations (../common/src/util/relations.ts:153:47)
|
|
2512
|
+
at EntityFetchService.fetchCollectionFromPath (src/services/EntityFetchService.ts:775:65)
|
|
2513
|
+
at EntityFetchService.fetchCollection (src/services/EntityFetchService.ts:722:25)
|
|
2514
|
+
at EntityService.fetchCollection (src/services/entityService.ts:70:34)
|
|
2515
|
+
at Object.<anonymous> (test/entityService.subcollection-search.test.ts:450:40)
|
|
2516
|
+
|
|
2517
|
+
PASS test/entityService.errors.test.ts
|
|
2518
|
+
PASS test/entityService.relations.test.ts
|
|
2519
|
+
β Console
|
|
2520
|
+
|
|
2521
|
+
console.debug
|
|
2522
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2523
|
+
relationName: 'orders',
|
|
2524
|
+
cardinality: 'many',
|
|
2525
|
+
direction: 'inverse',
|
|
2526
|
+
hasThrough: false,
|
|
2527
|
+
hasForeignKeyOnTarget: true,
|
|
2528
|
+
inverseRelationName: undefined,
|
|
2529
|
+
parentEntityId: '1'
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2533
|
+
|
|
2534
|
+
console.debug
|
|
2535
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
2536
|
+
|
|
2537
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
2538
|
+
|
|
2539
|
+
console.debug
|
|
2540
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'orders' with inverseRelationName 'undefined'
|
|
2541
|
+
|
|
2542
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
2543
|
+
|
|
2544
|
+
console.debug
|
|
2545
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
2546
|
+
|
|
2547
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
2548
|
+
|
|
2549
|
+
console.debug
|
|
2550
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
2551
|
+
|
|
2552
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
2553
|
+
|
|
2554
|
+
console.debug
|
|
2555
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2556
|
+
|
|
2557
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2558
|
+
|
|
2559
|
+
console.debug
|
|
2560
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2561
|
+
relationName: 'orders',
|
|
2562
|
+
cardinality: 'many',
|
|
2563
|
+
direction: 'inverse',
|
|
2564
|
+
hasThrough: false,
|
|
2565
|
+
hasForeignKeyOnTarget: true,
|
|
2566
|
+
inverseRelationName: undefined,
|
|
2567
|
+
parentEntityId: '999'
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2571
|
+
|
|
2572
|
+
console.debug
|
|
2573
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
2574
|
+
|
|
2575
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
2576
|
+
|
|
2577
|
+
console.debug
|
|
2578
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'orders' with inverseRelationName 'undefined'
|
|
2579
|
+
|
|
2580
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
2581
|
+
|
|
2582
|
+
console.debug
|
|
2583
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
2584
|
+
|
|
2585
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
2586
|
+
|
|
2587
|
+
console.debug
|
|
2588
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
2589
|
+
|
|
2590
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
2591
|
+
|
|
2592
|
+
console.debug
|
|
2593
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2594
|
+
|
|
2595
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2596
|
+
|
|
2597
|
+
console.debug
|
|
2598
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2599
|
+
relationName: 'products',
|
|
2600
|
+
cardinality: 'many',
|
|
2601
|
+
direction: 'owning',
|
|
2602
|
+
hasThrough: true,
|
|
2603
|
+
hasForeignKeyOnTarget: false,
|
|
2604
|
+
inverseRelationName: undefined,
|
|
2605
|
+
parentEntityId: '3'
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2609
|
+
at Array.map (<anonymous>)
|
|
2610
|
+
|
|
2611
|
+
console.debug
|
|
2612
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2613
|
+
|
|
2614
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2615
|
+
at Array.map (<anonymous>)
|
|
2616
|
+
|
|
2617
|
+
console.debug
|
|
2618
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2619
|
+
|
|
2620
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2621
|
+
at Array.map (<anonymous>)
|
|
2622
|
+
|
|
2623
|
+
console.debug
|
|
2624
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2625
|
+
relationName: 'products',
|
|
2626
|
+
cardinality: 'many',
|
|
2627
|
+
direction: 'owning',
|
|
2628
|
+
hasThrough: true,
|
|
2629
|
+
hasForeignKeyOnTarget: false,
|
|
2630
|
+
inverseRelationName: undefined,
|
|
2631
|
+
parentEntityId: '1'
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2635
|
+
at Array.map (<anonymous>)
|
|
2636
|
+
|
|
2637
|
+
console.debug
|
|
2638
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2639
|
+
|
|
2640
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2641
|
+
at Array.map (<anonymous>)
|
|
2642
|
+
|
|
2643
|
+
console.debug
|
|
2644
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2645
|
+
|
|
2646
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2647
|
+
at Array.map (<anonymous>)
|
|
2648
|
+
|
|
2649
|
+
console.debug
|
|
2650
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2651
|
+
relationName: 'products',
|
|
2652
|
+
cardinality: 'many',
|
|
2653
|
+
direction: 'owning',
|
|
2654
|
+
hasThrough: true,
|
|
2655
|
+
hasForeignKeyOnTarget: false,
|
|
2656
|
+
inverseRelationName: undefined,
|
|
2657
|
+
parentEntityId: '1'
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2661
|
+
|
|
2662
|
+
console.debug
|
|
2663
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2664
|
+
|
|
2665
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2666
|
+
|
|
2667
|
+
console.debug
|
|
2668
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2669
|
+
|
|
2670
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2671
|
+
|
|
2672
|
+
console.debug
|
|
2673
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2674
|
+
relationName: 'products',
|
|
2675
|
+
cardinality: 'many',
|
|
2676
|
+
direction: 'owning',
|
|
2677
|
+
hasThrough: true,
|
|
2678
|
+
hasForeignKeyOnTarget: false,
|
|
2679
|
+
inverseRelationName: undefined,
|
|
2680
|
+
parentEntityId: '4'
|
|
2681
|
+
}
|
|
2682
|
+
|
|
2683
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2684
|
+
at Array.map (<anonymous>)
|
|
2685
|
+
|
|
2686
|
+
console.debug
|
|
2687
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2688
|
+
|
|
2689
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2690
|
+
at Array.map (<anonymous>)
|
|
2691
|
+
|
|
2692
|
+
console.debug
|
|
2693
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2694
|
+
|
|
2695
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2696
|
+
at Array.map (<anonymous>)
|
|
2697
|
+
|
|
2698
|
+
console.debug
|
|
2699
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2700
|
+
relationName: 'profile',
|
|
2701
|
+
cardinality: 'one',
|
|
2702
|
+
direction: 'inverse',
|
|
2703
|
+
hasThrough: false,
|
|
2704
|
+
hasForeignKeyOnTarget: true,
|
|
2705
|
+
inverseRelationName: undefined,
|
|
2706
|
+
parentEntityId: '1'
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2710
|
+
|
|
2711
|
+
console.debug
|
|
2712
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
2713
|
+
|
|
2714
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
2715
|
+
|
|
2716
|
+
console.debug
|
|
2717
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2718
|
+
|
|
2719
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2720
|
+
|
|
2721
|
+
console.debug
|
|
2722
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2723
|
+
relationName: 'customer',
|
|
2724
|
+
cardinality: 'one',
|
|
2725
|
+
direction: 'owning',
|
|
2726
|
+
hasThrough: false,
|
|
2727
|
+
hasForeignKeyOnTarget: false,
|
|
2728
|
+
inverseRelationName: undefined,
|
|
2729
|
+
parentEntityId: '5'
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2733
|
+
at Array.map (<anonymous>)
|
|
2734
|
+
|
|
2735
|
+
console.debug
|
|
2736
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
2737
|
+
|
|
2738
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
2739
|
+
at Array.map (<anonymous>)
|
|
2740
|
+
|
|
2741
|
+
console.debug
|
|
2742
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2743
|
+
|
|
2744
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2745
|
+
at Array.map (<anonymous>)
|
|
2746
|
+
|
|
2747
|
+
console.debug
|
|
2748
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2749
|
+
relationName: 'products',
|
|
2750
|
+
cardinality: 'many',
|
|
2751
|
+
direction: 'owning',
|
|
2752
|
+
hasThrough: true,
|
|
2753
|
+
hasForeignKeyOnTarget: false,
|
|
2754
|
+
inverseRelationName: undefined,
|
|
2755
|
+
parentEntityId: '5'
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2759
|
+
at Array.map (<anonymous>)
|
|
2760
|
+
|
|
2761
|
+
console.debug
|
|
2762
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2763
|
+
|
|
2764
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2765
|
+
at Array.map (<anonymous>)
|
|
2766
|
+
|
|
2767
|
+
console.debug
|
|
2768
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2769
|
+
|
|
2770
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2771
|
+
at Array.map (<anonymous>)
|
|
2772
|
+
|
|
2773
|
+
console.debug
|
|
2774
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2775
|
+
relationName: 'products',
|
|
2776
|
+
cardinality: 'many',
|
|
2777
|
+
direction: 'owning',
|
|
2778
|
+
hasThrough: true,
|
|
2779
|
+
hasForeignKeyOnTarget: false,
|
|
2780
|
+
inverseRelationName: undefined,
|
|
2781
|
+
parentEntityId: '1'
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2785
|
+
|
|
2786
|
+
console.debug
|
|
2787
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2788
|
+
|
|
2789
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2790
|
+
|
|
2791
|
+
console.debug
|
|
2792
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2793
|
+
|
|
2794
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2795
|
+
|
|
2796
|
+
console.debug
|
|
2797
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2798
|
+
relationName: 'orders',
|
|
2799
|
+
cardinality: 'many',
|
|
2800
|
+
direction: 'inverse',
|
|
2801
|
+
hasThrough: false,
|
|
2802
|
+
hasForeignKeyOnTarget: true,
|
|
2803
|
+
inverseRelationName: undefined,
|
|
2804
|
+
parentEntityId: '1'
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2808
|
+
|
|
2809
|
+
console.debug
|
|
2810
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
2811
|
+
|
|
2812
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
2813
|
+
|
|
2814
|
+
console.debug
|
|
2815
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'orders' with inverseRelationName 'undefined'
|
|
2816
|
+
|
|
2817
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
2818
|
+
|
|
2819
|
+
console.debug
|
|
2820
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
2821
|
+
|
|
2822
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
2823
|
+
|
|
2824
|
+
console.debug
|
|
2825
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
2826
|
+
|
|
2827
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
2828
|
+
|
|
2829
|
+
console.debug
|
|
2830
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2831
|
+
|
|
2832
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2833
|
+
|
|
2834
|
+
console.debug
|
|
2835
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2836
|
+
relationName: 'orders',
|
|
2837
|
+
cardinality: 'many',
|
|
2838
|
+
direction: 'inverse',
|
|
2839
|
+
hasThrough: false,
|
|
2840
|
+
hasForeignKeyOnTarget: true,
|
|
2841
|
+
inverseRelationName: undefined,
|
|
2842
|
+
parentEntityId: '1'
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2846
|
+
|
|
2847
|
+
console.debug
|
|
2848
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
2849
|
+
|
|
2850
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
2851
|
+
|
|
2852
|
+
console.debug
|
|
2853
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'orders' with inverseRelationName 'undefined'
|
|
2854
|
+
|
|
2855
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
2856
|
+
|
|
2857
|
+
console.debug
|
|
2858
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
2859
|
+
|
|
2860
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
2861
|
+
|
|
2862
|
+
console.debug
|
|
2863
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
2864
|
+
|
|
2865
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
2866
|
+
|
|
2867
|
+
console.debug
|
|
2868
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2869
|
+
|
|
2870
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2871
|
+
|
|
2872
|
+
console.debug
|
|
2873
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2874
|
+
relationName: 'products',
|
|
2875
|
+
cardinality: 'many',
|
|
2876
|
+
direction: 'owning',
|
|
2877
|
+
hasThrough: true,
|
|
2878
|
+
hasForeignKeyOnTarget: false,
|
|
2879
|
+
inverseRelationName: undefined,
|
|
2880
|
+
parentEntityId: '1'
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2884
|
+
at Array.map (<anonymous>)
|
|
2885
|
+
|
|
2886
|
+
console.debug
|
|
2887
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2888
|
+
|
|
2889
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2890
|
+
at Array.map (<anonymous>)
|
|
2891
|
+
|
|
2892
|
+
console.debug
|
|
2893
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2894
|
+
|
|
2895
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2896
|
+
at Array.map (<anonymous>)
|
|
2897
|
+
|
|
2898
|
+
console.debug
|
|
2899
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2900
|
+
relationName: 'customer',
|
|
2901
|
+
cardinality: 'one',
|
|
2902
|
+
direction: 'owning',
|
|
2903
|
+
hasThrough: false,
|
|
2904
|
+
hasForeignKeyOnTarget: false,
|
|
2905
|
+
inverseRelationName: undefined,
|
|
2906
|
+
parentEntityId: '1'
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2910
|
+
at Array.map (<anonymous>)
|
|
2911
|
+
|
|
2912
|
+
console.debug
|
|
2913
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
2914
|
+
|
|
2915
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
2916
|
+
at Array.map (<anonymous>)
|
|
2917
|
+
|
|
2918
|
+
console.debug
|
|
2919
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
2920
|
+
|
|
2921
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2922
|
+
at Array.map (<anonymous>)
|
|
2923
|
+
|
|
2924
|
+
console.debug
|
|
2925
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2926
|
+
relationName: 'products',
|
|
2927
|
+
cardinality: 'many',
|
|
2928
|
+
direction: 'owning',
|
|
2929
|
+
hasThrough: true,
|
|
2930
|
+
hasForeignKeyOnTarget: false,
|
|
2931
|
+
inverseRelationName: undefined,
|
|
2932
|
+
parentEntityId: '1'
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2935
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2936
|
+
at Array.map (<anonymous>)
|
|
2937
|
+
|
|
2938
|
+
console.debug
|
|
2939
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
2940
|
+
|
|
2941
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
2942
|
+
at Array.map (<anonymous>)
|
|
2943
|
+
|
|
2944
|
+
console.debug
|
|
2945
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
2946
|
+
|
|
2947
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
2948
|
+
at Array.map (<anonymous>)
|
|
2949
|
+
|
|
2950
|
+
console.warn
|
|
2951
|
+
Cannot set joinPath relation 'authorProfile' because parent FK value is null/undefined
|
|
2952
|
+
|
|
2953
|
+
914 | .where(eq(targetFKCol, parentFKValue as unknown as string));
|
|
2954
|
+
915 | } else {
|
|
2955
|
+
> 916 | console.warn(`Cannot set joinPath relation '${relation.relationName}' because parent FK value is null/undefined`);
|
|
2956
|
+
| ^
|
|
2957
|
+
917 | continue;
|
|
2958
|
+
918 | }
|
|
2959
|
+
919 |
|
|
2960
|
+
|
|
2961
|
+
at RelationService.updateJoinPathOneToOneRelations (src/services/RelationService.ts:916:25)
|
|
2962
|
+
at src/services/EntityPersistService.ts:236:17
|
|
2963
|
+
at EntityPersistService.saveEntity (src/services/EntityPersistService.ts:189:25)
|
|
2964
|
+
at Object.<anonymous> (test/entityService.relations.test.ts:563:32)
|
|
2965
|
+
|
|
2966
|
+
console.debug
|
|
2967
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
2968
|
+
relationName: 'orders',
|
|
2969
|
+
cardinality: 'many',
|
|
2970
|
+
direction: 'inverse',
|
|
2971
|
+
hasThrough: false,
|
|
2972
|
+
hasForeignKeyOnTarget: true,
|
|
2973
|
+
inverseRelationName: undefined,
|
|
2974
|
+
parentEntityId: '1'
|
|
2975
|
+
}
|
|
2976
|
+
|
|
2977
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
2978
|
+
at Array.map (<anonymous>)
|
|
2979
|
+
|
|
2980
|
+
console.debug
|
|
2981
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
2982
|
+
|
|
2983
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
2984
|
+
at Array.map (<anonymous>)
|
|
2985
|
+
|
|
2986
|
+
console.debug
|
|
2987
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'orders' with inverseRelationName 'undefined'
|
|
2988
|
+
|
|
2989
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
2990
|
+
at Array.map (<anonymous>)
|
|
2991
|
+
|
|
2992
|
+
console.debug
|
|
2993
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
2994
|
+
|
|
2995
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
2996
|
+
at Array.map (<anonymous>)
|
|
2997
|
+
|
|
2998
|
+
console.debug
|
|
2999
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
3000
|
+
|
|
3001
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
3002
|
+
at Array.map (<anonymous>)
|
|
3003
|
+
|
|
3004
|
+
console.debug
|
|
3005
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
3006
|
+
|
|
3007
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
3008
|
+
at Array.map (<anonymous>)
|
|
3009
|
+
|
|
3010
|
+
console.debug
|
|
3011
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
3012
|
+
relationName: 'customer',
|
|
3013
|
+
cardinality: 'one',
|
|
3014
|
+
direction: 'owning',
|
|
3015
|
+
hasThrough: false,
|
|
3016
|
+
hasForeignKeyOnTarget: false,
|
|
3017
|
+
inverseRelationName: undefined,
|
|
3018
|
+
parentEntityId: '1'
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
3022
|
+
at Array.map (<anonymous>)
|
|
3023
|
+
|
|
3024
|
+
console.debug
|
|
3025
|
+
π [buildRelationConditions] Using simple relation logic - THIS IS WHERE THE ERROR MIGHT OCCUR
|
|
3026
|
+
|
|
3027
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:191:21)
|
|
3028
|
+
at Array.map (<anonymous>)
|
|
3029
|
+
|
|
3030
|
+
console.debug
|
|
3031
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
3032
|
+
|
|
3033
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
3034
|
+
at Array.map (<anonymous>)
|
|
3035
|
+
|
|
3036
|
+
console.debug
|
|
3037
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
3038
|
+
relationName: 'products',
|
|
3039
|
+
cardinality: 'many',
|
|
3040
|
+
direction: 'owning',
|
|
3041
|
+
hasThrough: true,
|
|
3042
|
+
hasForeignKeyOnTarget: false,
|
|
3043
|
+
inverseRelationName: undefined,
|
|
3044
|
+
parentEntityId: '1'
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
3048
|
+
at Array.map (<anonymous>)
|
|
3049
|
+
|
|
3050
|
+
console.debug
|
|
3051
|
+
π [buildRelationConditions] Using owning many-to-many with explicit through
|
|
3052
|
+
|
|
3053
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:138:21)
|
|
3054
|
+
at Array.map (<anonymous>)
|
|
3055
|
+
|
|
3056
|
+
console.debug
|
|
3057
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 1, whereConditionsCount: 1 }
|
|
3058
|
+
|
|
3059
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
3060
|
+
at Array.map (<anonymous>)
|
|
3061
|
+
|
|
3062
|
+
console.debug
|
|
3063
|
+
π [buildRelationConditions] Building conditions for relation: {
|
|
3064
|
+
relationName: 'orders',
|
|
3065
|
+
cardinality: 'many',
|
|
3066
|
+
direction: 'inverse',
|
|
3067
|
+
hasThrough: false,
|
|
3068
|
+
hasForeignKeyOnTarget: true,
|
|
3069
|
+
inverseRelationName: undefined,
|
|
3070
|
+
parentEntityId: '1'
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:107:17)
|
|
3074
|
+
at Array.map (<anonymous>)
|
|
3075
|
+
|
|
3076
|
+
console.debug
|
|
3077
|
+
π [buildRelationConditions] Handling inverse many relationship without explicit through
|
|
3078
|
+
|
|
3079
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:162:21)
|
|
3080
|
+
at Array.map (<anonymous>)
|
|
3081
|
+
|
|
3082
|
+
console.debug
|
|
3083
|
+
π [findCorrespondingJunctionTable] Looking for junction table for inverse relation 'orders' with inverseRelationName 'undefined'
|
|
3084
|
+
|
|
3085
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:938:21)
|
|
3086
|
+
at Array.map (<anonymous>)
|
|
3087
|
+
|
|
3088
|
+
console.debug
|
|
3089
|
+
π [findCorrespondingJunctionTable] No inverseRelationName specified
|
|
3090
|
+
|
|
3091
|
+
at Function.findCorrespondingJunctionTable (src/utils/drizzle-conditions.ts:941:25)
|
|
3092
|
+
at Array.map (<anonymous>)
|
|
3093
|
+
|
|
3094
|
+
console.debug
|
|
3095
|
+
π [buildRelationConditions] No junction table found, treating as inverse one-to-many with foreign key on target
|
|
3096
|
+
|
|
3097
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:177:25)
|
|
3098
|
+
at Array.map (<anonymous>)
|
|
3099
|
+
|
|
3100
|
+
console.debug
|
|
3101
|
+
π [buildRelationConditions] Final result: { joinConditionsCount: 0, whereConditionsCount: 1 }
|
|
3102
|
+
|
|
3103
|
+
at Function.buildRelationConditions (src/utils/drizzle-conditions.ts:202:17)
|
|
3104
|
+
at Array.map (<anonymous>)
|
|
3105
|
+
|
|
3106
|
+
PASS test/auth-services.test.ts
|
|
3107
|
+
PASS test/branchService.test.ts
|
|
3108
|
+
PASS test/relations.test.ts
|
|
3109
|
+
PASS test/historyService.test.ts
|
|
3110
|
+
FAIL test/generate-drizzle-schema.test.ts
|
|
3111
|
+
β Test suite failed to run
|
|
3112
|
+
|
|
3113
|
+
[96mtest/generate-drizzle-schema.test.ts[0m:[93m797[0m:[93m1[0m - [91merror[0m[90m TS1005: [0m'}' expected.
|
|
3114
|
+
|
|
3115
|
+
[7m797[0m
|
|
3116
|
+
[7m [0m [91m[0m
|
|
3117
|
+
|
|
3118
|
+
[96mtest/generate-drizzle-schema.test.ts[0m:[93m4[0m:[93m41[0m
|
|
3119
|
+
[7m4[0m describe("generateDrizzleSchema", () => {
|
|
3120
|
+
[7m [0m [96m ~[0m
|
|
3121
|
+
The parser expected to find a '}' to match the '{' token here.
|
|
3122
|
+
|
|
3123
|
+
Test Suites: 1 failed, 10 passed, 11 total
|
|
3124
|
+
Tests: 238 passed, 238 total
|
|
3125
|
+
Snapshots: 0 total
|
|
3126
|
+
Time: 1.835 s
|
|
3127
|
+
Ran all test suites.
|
|
3128
|
+
βELIFECYCLEβ Test failed. See above for more details.
|