project-nomad/admin/app
Jake Turner ac791f7a2c
fix(models): correct inverted belongsTo keys on ChatMessage.session (#921)
foreignKey/localKey were swapped on the ChatMessage → ChatSession
relation. Per Lucid's belongsTo contract, foreignKey is the column
on the child model and localKey is on the parent — so this must be
{ foreignKey: 'session_id', localKey: 'id' }, mirroring the inverse
hasMany on ChatSession.

The relation is not currently preloaded anywhere in the codebase, so
no runtime behavior changes today; this closes a latent bug that
would have broken any future preload('session') call.
2026-05-20 09:21:36 -07:00
..
controllers feat(chat): confirm-on-switch + one-chat-model-at-a-time enforcement 2026-05-19 15:44:16 -07:00
exceptions fix(Docs): documentation renderer fixes 2025-12-23 16:00:33 -08:00
jobs fix(KB): respect Manual ingest policy on post-download dispatch 2026-05-19 16:02:09 -07:00
middleware fix(API): skip compression for Server-Sent Events (#798) 2026-04-27 19:00:31 -07:00
models fix(models): correct inverted belongsTo keys on ChatMessage.session (#921) 2026-05-20 09:21:36 -07:00
services fix(content): show selected tier on cards while downloads are in flight 2026-05-19 15:55:07 -07:00
utils refactor(KB): move FileWarning to shared types/rag following existing convention 2026-05-16 21:51:29 -07:00
validators feat(chat): confirm-on-switch + one-chat-model-at-a-time enforcement 2026-05-19 15:44:16 -07:00