Skip to content

fresh() doesn't call any lifecycle Hook #1722

Description

@abd777

Environment

No response

Reproduction

Playground

Describe the bug

I need to listen for the lifecycle hook inside the Model when the fresh() is called , but no any lifecycle hook is listening to fresh() while if i use save() it works

For now i'm using this as a workaround

const repo = useRepo(REPO_NAME)
// clear everything
repo.flush()
// then save , i.e to trigger the lifecycle
repo.save(NEW_DATA)

ideally fresh() should also be a lifecycle hook trigger

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions