@stibiumz In our development, I got an error ---- " [ERROR] Syntax error, unexpected EOF". I used xdebug to track what happened and found that the query builder try to execute with empty bind values in "inWhere" method. This Error is located at line 203 in EagerLoading\EagerLoad.php.
In our case, the "$subjectSize" is equal 0.
We have follow three models: "Invoice","Payment","Method". Each invoice have many payments, and each payment have one method. In my code:
$inv=Invoice::findFirstById("1");
then I tried to load payment and method using: $inv->load("Payment.Method");
For invoice 1, there are not any payment yet in database.
So I expected the result of $inv->payment should be null when I called $inv->load("Payment.Method").
@stibiumz In our development, I got an error ---- " [ERROR] Syntax error, unexpected EOF". I used xdebug to track what happened and found that the query builder try to execute with empty bind values in "inWhere" method. This Error is located at line 203 in EagerLoading\EagerLoad.php.
In our case, the "$subjectSize" is equal 0. We have follow three models: "Invoice","Payment","Method". Each invoice have many payments, and each payment have one method. In my code: $inv=Invoice::findFirstById("1"); then I tried to load payment and method using: $inv->load("Payment.Method"); For invoice 1, there are not any payment yet in database. So I expected the result of $inv->payment should be null when I called $inv->load("Payment.Method").
Could anyone fix this?