Closed rezadsn closed 1 year ago
Hey there,
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.
Thanks!
Laravel Version
10.10
PHP Version
8.1.7
Database Driver & Version
sqlsrv
Description
I have a model called Stage. and it has a HasMany relation 'products'. Recently the project was upgraded from version 9 to 10.
If I do the following:
It is supposed to return the products
or
Supposed to return at least 1 OrderStage record.
both returns an empty collection.
Even the dump
$this->getAttributes()
returns an empty array. I also tried many options such as `$this->getRawOriginal('StageId'). It always returns nullHowver if I do
$stages->map->products
it returns all the data that I am supposed to get.Steps To Reproduce
To reproduce the error you'll need the following:
MSSQL
OrderStage.php
columns:
OrderProduct.php
columns:
Run the following in tinker well or tinker or wherever it seems fit.
Expected Output: