Commit 6138799
committed
fix(backend): use native INSERT for import Activity rows (JSONB cast)
Hibernate binds String → varchar by default; the `diff_json` column is
JSONB, so an INSERT with the JPA Activity entity fails with
`column "diff_json" is of type jsonb but expression is of type
character varying` — all 9 import/export integration tests tripped on
this on first write (import seeds translations via the service).
Mirror the existing `KeyService.writeActivity` native-SQL INSERT so the
column type stays happy until Phase 7 (T706) back-fills structured
diff payloads.
No behaviour change; the entity write path wasn't being used elsewhere.
Drops the `Activity` import since we no longer construct the entity.1 parent 7e84e1c commit 6138799
1 file changed
Lines changed: 17 additions & 8 deletions
File tree
- backend/service/src/main/kotlin/io/translately/service/translations
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
256 | 265 | | |
257 | 266 | | |
258 | 267 | | |
| |||
0 commit comments