Column Not Found SQL ERROR
Hello there filament,
Love the admin panel, tough I have a weird issue I can't figure out.
When I sort the visible 'Venue names' I get an SQL error saying Column not found.
I get the following error:
I believe the query it fails on is:
But if I run
On my database I do get all venue_id returned
14 Replies
You are missing a join.
Where can I find the Query with the join that gets fired ?
This is how I have my column set
---
the Answer belongs to a single question
And a question belongsTo a single Venue
Tough a Question also has Many answers
---
Should I fix this by relating an answer to a venue with a foregin id as well ?
Not sure if this is supported 3 levels deep
Thanks for your input! I'll make the extra relationship then I guess 🙂
Hi, I have a question, when migrating data into my database I get an error message SQLSTATE[HY000]: (errno: 150 "Foreign key constraint is incorrectly formed") (Connection: mysql, SQL: alter table
cocntacts
add constraint cocntacts_country_id_foreign
foreign key (country_id
) references countries
(id
) on delete cascade). What am I doing wrong?This is more of a Laravel issue, but why don't you show us your two migrations? Then we can probably find the error.
for those lines that are commented, it gives me an error
You have a sequencing issue. You can only establish a relationship between columns if both exist. The first migration that is executed attempts to establish relationships with a column in a table that doesn't even exist yet.
`how can I set the migration order
Quote from Laravel Documentation:
The timestamp determines when each migration is executed. Change the timestamp in the filename to alter the order.
Ok thanks for the advice
Hi I have a problem with saving data to the database. SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '["1","2"]' for column
crm
.companies
.contact_id
at row 1.May I ask your advice please?this is Laravel relationships and not filament related. Your screenshots suggest you have a hasOne->contact relation ship and you are assigning an array of contact_ids which suggest you are implementing an hasMany->contacts