© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
11 replies
Andi

Import update if exists not working with database driver

Hi guys

I'm on Filament
v3.2.34
v3.2.34
, so latest release.

When using sync queue driver, the record gets updated, but as soon as I use the database driver, there is always a new record created.

This is my code:
public function resolveRecord(): ?Sale
    {
        return Sale::firstOrNew([
            'shop_id' => $this->options['shop_id'],
            'sales_date' => $this->data['sales_date'],
        ]);
    }
public function resolveRecord(): ?Sale
    {
        return Sale::firstOrNew([
            'shop_id' => $this->options['shop_id'],
            'sales_date' => $this->data['sales_date'],
        ]);
    }


Do you guys know a workaround or is it a bug?
Solution
....
it was the global scope which interefered.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Import not working..
FilamentFFilament / ❓┊help
15mo ago
Import Action not working
FilamentFFilament / ❓┊help
12mo ago
Import Action not working
FilamentFFilament / ❓┊help
2y ago
Database Import Issue
FilamentFFilament / ❓┊help
2y ago