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