FilamentF
Filament16mo ago
Asmit

Add table name on edit page query

select
  "products".*
from
  "products"
  inner join "categories" on "products"."category_id" = "categories"."id"
where
  "id" = 8
  and "categories"."type_id" = 1
  and "products"."deleted_at" is null
limit
  1

Here I use scope to fetch product for that types,
The
id
Ambiguous issue is occur while try to edit and view the individual product,
Is there any way to add table name on where
id
clause on filament to fetch individual record.
like
select
  "products".*
from
  "products"
  inner join "categories" on "products"."category_id" = "categories"."id"
where
  "products.id" = 8
  and "categories"."type_id" = 1
  and "products"."deleted_at" is null
limit
  1
Was this page helpful?