actualbudget / actualbudget/actual

[Bug]: SqliteError: no such column: categories2.group

Abierto
#5,616 4 comentarios 0 reacciones 0 asignados Ver en GitHub
API
Lenguaje dominante
TypeScript
Estrellas
28.7k
Forks
3k
Merge medio
2 d 11 h
PR fusionados (30 d)
65

Descripción

### Verified issue does not already exist?

- [x] I have searched and found no existing issue

### What happened?

Trying to pull all transactions and the account, category and category group name using ActualQL using

```
const query = api.q('transactions')
.filter({ date: { $transform: '$month', $eq: month } })
.select(['*',
'category.group.name',
'category.name',
'account.name',
]);
```

Fails on the category.group.name - remove category.group.name and it works

When it fails I get the below error returned. I assume this a bug ?

```
**Error Summary:**
Node script failed with return code 1
SqliteError: no such column: categories2.group
Node.js v20.19.0
**Context / Stack Trace:**
at Database.prepare (.../node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)
at Module.runQuery (.../node_modules/@actual-app/api/dist/app/bundle.api.js:11042:52)
at runQuery (.../node_modules/@actual-app/api/dist/app/bundle.api.js:13756:127)
at Module.all (.../node_modules/@actual-app/api/dist/app/bundle.api.js:13763:54)
at execQuery (.../node_modules/@actual-app/api/dist/app/bundle.api.js:12034:261)
at execTransactionsBasic (.../node_modules/@actual-app/api/dist/app/bundle.api.js:12179:361)
at Object.transactions (.../node_modules/@actual-app/api/dist/app/bundle.api.js:12184:173)
at runCompiledAqlQuery (.../node_modules/@actual-app/api/dist/app/bundle.api.js:12039:300)
at compileAndRunAqlQuery (.../node_modules/@actual-app/api/dist/app/bundle.api.js:12046:236)
at aqlQuery (.../node_modules/@actual-app/api/dist/app/bundle.api.js:12052:214)
**Stdout / Info:**
Loaded spreadsheet from cache (16,511 items)
Syncing since 2025-08-23T12:43:04.551Z
Attempt: 0
Got messages from server: 0
**Problematic SQL Query (truncated for readability):**
SELECT
v_transactions_internal_alive.id AS id,
v_transactions_internal_alive.is_parent AS is_parent,
categories2.name AS "category.name",
category_groups5.name AS "category.group.name",
accounts1.name AS "account.name",
...
FROM v_transactions_internal_alive
LEFT JOIN accounts accounts1 ON ...
LEFT JOIN categories categories2 ON ...
LEFT JOIN category_groups category_groups5 ON category_groups5.id = categories2."group" AND category_groups5.tombstone = 0
WHERE ...
ORDER BY v_transactions_internal_alive.date DESC, ...
```

### How can we reproduce the issue?

Try executing the above query using aqlQuery.

### Where are you hosting Actual?

Docker

### What browsers are you seeing the problem on?

Safari

### Operating System

Mac OSX

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.