Skip to content

Conversation

@marimelon
Copy link

@marimelon marimelon commented Nov 28, 2025

Since v1.30.0, the *gorm.DB instance passed to Preload callbacks has clone=0, causing chain methods to modify the same instance instead of creating new ones. This test demonstrates the issue by reusing the db variable with multiple Where() calls in a Preload callback.

Since v1.30.0, the *gorm.DB instance passed to Preload callbacks has
clone=0, causing chain methods to modify the same instance instead of
creating new ones. This test demonstrates the issue by reusing the db
variable with multiple Where() calls in a Preload callback.
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

Successfully merging this pull request may close these issues.

1 participant