coldbox-modules / quick

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

Proposal to add ability to set defaultReturnFormat in quick module settings #206

Closed ryanalbrecht closed 1 year ago

ryanalbrecht commented 1 year ago

in reference to #186

It seems quick needs to set the underlying qb instance's returnFormat to an array to function correctly. I am proposing the following changes to allow a user to set the default return format in the coldbox.cfc module settings.

The QuickBuilder will now track its own internal returnFormat. When calling retrieveQuery() on an entity it will set the return format for the underlying qb instance before returning it to the user. I also implemented a setReturnFormat() in the QuickBuilder class so this method call is not forwarded onto the QuickQB instance.

Thoughts?

ryanalbrecht commented 1 year ago

Accidentally change server.json.

Will reopen another pull request