Import update if exists not working with database driver
Hi guys
I'm on Filament
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:
Do you guys know a workaround or is it a bug?6 Replies
bump
bump
have you tried any of the other similar methods
updateOrCreate for example
and if those records are created, are they identical ? at least those 2 fields
Yes, the records are identical. I tried firstOrCreate, firstOrNew and now also updateOrCreate. Non of them work.
I also noted that when I dump the results of the query, with sync I get 1 item back, the one needed. As soon as I switch to DB driver, the query result is emtpy. So therefore it creates a new record.
sounds like there is a rollback happening in mysql
or a transaction started but not commited
well I think the process where the queue runs on can't query the data.
Solution
....
it was the global scope which interefered.