Skip to content

fix: relation loading forces related models onto the parent/builder connection#255

Merged
techmahedy merged 1 commit intodoppar:3.xfrom
techmahedy:techmahedy-3.x
Apr 25, 2026
Merged

fix: relation loading forces related models onto the parent/builder connection#255
techmahedy merged 1 commit intodoppar:3.xfrom
techmahedy:techmahedy-3.x

Conversation

@techmahedy
Copy link
Copy Markdown
Member

@techmahedy techmahedy commented Apr 25, 2026

Assume we have User and Permission, Model.

This PR resolves an issue where the user relationship on the Permission model was not loading correctly when the Permission model used a custom database connection (e.g., 'test') while the User model remained on the default connection.

This fix ensures that the user relationship correctly resolves and loads data even when the Permission model uses a different connection than the User model.

Example

$permission = Permission::find(1);
$permission->user;

@techmahedy techmahedy merged commit 9ab0c75 into doppar:3.x Apr 25, 2026
27 checks passed
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