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

Entity instance in cache differs from the provided when using EntityHooks #2443

Open
constructivetim opened this issue Mar 12, 2025 · 0 comments

Comments

@constructivetim
Copy link

constructivetim commented Mar 12, 2025

i am using EntityHooks to ensure that i record an updatedAt date

    EntityHook.subscribe { entityChange ->
        if (entityChange.changeType == EntityChangeType.Updated) {
            if (entityChange.entityClass == FanArtistTable.FanArtist) entityChange.toEntity(FanArtistTable.FanArtist)?.updatedAt = DateTime.now()
        }
    }

however, when I do, I see this a lot

ERROR Exposed - Entity instance in cache differs from the provided: FanArtist with ID b8dc8bb6-4ddc-48bb-b528-9510a86935bc. Changes on entity could be missed.

if I remove the hook, everything is fine.

exposed 0.59.0

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

1 participant