Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document not updated if 'afterCommit' is true #44

Closed
bin-emanuele opened this issue Feb 2, 2023 · 1 comment
Closed

Document not updated if 'afterCommit' is true #44

bin-emanuele opened this issue Feb 2, 2023 · 1 comment

Comments

@bin-emanuele
Copy link

Description

The TypesenseEngine::update will check if the model is dirty, but if the 'afterCommit' is set to true in the config, the method will always skip.

Steps to reproduce

  • set scout.after_commit to true
  • trigger a save event on a Searchable model

Expected Behavior

TypesenseEngine::update should update the model, ignoring the 'isDirty' if 'afterCommit' is set to true.

Actual Behavior

TypesenseEngine::update skips the update.

Metadata

Typesense Version: 0.24.0

typesense/laravel-scout-typesense-driver: v5.2.0,
laravel/scout: v9.8.0

OS: Ubuntu 22.04

@manavo
Copy link
Contributor

manavo commented Feb 27, 2023

This is also referencing isDirty the same as #45, and v5.2.0 which was rolled back.

Are they both about the same issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants