coldbox-modules / quick

A ColdBox ORM Engine
https://quick.ortusbooks.com
MIT License
23 stars 19 forks source link

Fix Required Parameter Error When Null #209

Closed homestar9 closed 1 year ago

homestar9 commented 1 year ago

When the guardAgainstNotLoaded() is disabled, and you attempt to call a relationship, isNullValue() will throw the exception: "The required parameter arguments.value was not provided". Adding a try/catch statement here allows null to pass through without triggering the exception.

bdw429s commented 1 year ago

This pull request has been mentioned on Ortus Solutions Community. There might be relevant details there:

https://community.ortussolutions.com/t/quick-5-what-is-the-optimal-way-to-return-a-subset-of-properties-from-a-relationship/9427/3

ryanalbrecht commented 1 year ago

This is related to #213

elpete commented 1 year ago

An empty try/catch is not how I want to handle this. I think the issue is the param. Let's break this out into checking and assigning manually to avoid this strange issue.

elpete commented 1 year ago

I'm closing this in favor of #213