diff --git a/views.cpp b/views.cpp index 48f50b2..265efb7 100644 --- a/views.cpp +++ b/views.cpp @@ -1629,9 +1629,11 @@ void views_table_windows_sync(AppState& app, const char* ops_db) { if (db) sqlite3_close(db); return; } + // json_extract devuelve INTEGER 1 para JSON true; comparamos contra 1 + // (json('true') no es comparable directo — devuelve TEXT 'true'). const char* sql = "SELECT id FROM entities " - "WHERE type_ref = 'Table' AND json_extract(metadata,'$.expanded') = json('true')"; + "WHERE type_ref = 'Table' AND json_extract(metadata,'$.expanded') = 1"; sqlite3_stmt* st = nullptr; if (sqlite3_prepare_v2(db, sql, -1, &st, nullptr) != SQLITE_OK) { sqlite3_close(db);