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

Relationship on string values #136

Open
potasium opened this issue Feb 3, 2022 · 1 comment
Open

Relationship on string values #136

potasium opened this issue Feb 3, 2022 · 1 comment

Comments

@potasium
Copy link

potasium commented Feb 3, 2022

Columns are varchar and foreign key - local key can be upper case- lower case. In this situation;
When using $model1->has('model2') it is working but eager loading returns null.

@MaartenOste
Copy link

Same issue here. When I use a varchar identifier in both tables (for example: "ABC-12345") eager loading doens't work.
When I remove the relationship from eager loading, accessing the model through the relationship does work doh.
I tried changing the identiefier to an integer and this made eager loading possible again.

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

2 participants