Prevent save to not existing column
I have a dependent select. In this table I don't have product_id, I only save to variant_id. The product is only shown in order to filter the variant. How do I prevent the form to try to save to product field. Filament will always try to save a field to a column.
Column not found: 1054 Unknown column 'product' in 'field list'
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1169499341849886762/Screenshot_2023-11-02_at_11.49.01.png)
6 Replies
Can you try
->dehydrated(false)
read more here https://filamentphp.com/docs/3.x/forms/advanced#preventing-a-field-from-being-dehydrated![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1169501268138528768/Screenshot_2023-11-02_at_12.00.24.png)
I still get this error @Vp
I only need the product dropdown to get the variant but I don't save the selected product to the order table.
According to the link it should prevent, If it doesn't work then I don't have any idea, sorry
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1169502157700071484/Screenshot_from_2023-11-02_12-02-35.png)
@Vp order matters. I put the method below live(), it's not working. But moving it above is working.
Thank you
Oh, I also learned new lesson "order matters"