Commit dd28d78
committed
fix(V2): exclude cross-ref FKs from join table ownership resolution
Join tables (project_methodology, stakeholder_projects, unit_label)
reference entities owned by different organizations. The ownership
guard was following all parent FKs, collecting non-home org UIDs from
the referenced side, and blocking legitimate deletes/cascade deletes.
Only follow the owning-side FK for ownership resolution on these
tables while leaving non-join table behavior unchanged.1 parent c0dce25 commit dd28d78
1 file changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
161 | 180 | | |
162 | 181 | | |
163 | 182 | | |
| |||
311 | 330 | | |
312 | 331 | | |
313 | 332 | | |
| 333 | + | |
314 | 334 | | |
315 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
316 | 338 | | |
317 | 339 | | |
318 | 340 | | |
| |||
332 | 354 | | |
333 | 355 | | |
334 | 356 | | |
| 357 | + | |
| 358 | + | |
335 | 359 | | |
336 | 360 | | |
337 | 361 | | |
| |||
340 | 364 | | |
341 | 365 | | |
342 | 366 | | |
343 | | - | |
| 367 | + | |
344 | 368 | | |
345 | 369 | | |
346 | 370 | | |
| |||
0 commit comments