Samazer
Samazer
FFilament
Created by Samazer on 2/28/2025 in #❓┊help
SQL Error when saving, no such column
I have 3 resources: FoodMenu, FoodMenuSections, FoodMenuItems. A food menu has many sections and a section has many items. I have the section relation manager and the item relation manager set up. The errors When I save a food menu section with the menu set I get the following error
SQLSTATE[HY000]: General error: 1 no such column: menu_id (Connection: sqlite, SQL: update "food_menu_sections" set "menu_id" = 1, "updated_at" = 2025-02-28 15:57:36 where "id" = 6)
SQLSTATE[HY000]: General error: 1 no such column: menu_id (Connection: sqlite, SQL: update "food_menu_sections" set "menu_id" = 1, "updated_at" = 2025-02-28 15:57:36 where "id" = 6)
Then if I look at the database the row is created exactly how I was expecting, with the menu id set under the food_menu_id column. So I don't understand the error as I've not tried to set menu_id and the query seems to work? The same error happens when creating a food menu item
SQLSTATE[HY000]: General error: 1 no such column: section_id (Connection: sqlite, SQL: update "food_menu_items" set "section_id" = 1, "updated_at" = 2025-02-28 16:05:13 where "id" = 11)
SQLSTATE[HY000]: General error: 1 no such column: section_id (Connection: sqlite, SQL: update "food_menu_items" set "section_id" = 1, "updated_at" = 2025-02-28 16:05:13 where "id" = 11)
On both filament resources I am referencing the correct column from the table so I don't know why this error is being thrown? neither menu_id or section_id are referenced anywhere in the code.
2 replies