Closed
Description
- Laravel Version: 5.4.6
- PHP Version: 7.1.1
- Database Driver & Version: MariaDB 10.1.20
Description:
Eloquent relation return null instead of model when the id key in the database table is 0 (for non auto-increment table), it works fine in 5.2/5.3.
Steps To Reproduce:
Use a relation like belongTo in a model, submodel have key like id 0,1,2 if key = 0 the relation return null instead of returning the submodel .
Metadata
Metadata
Assignees
Labels
No labels