coldbox-modules / quick

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

Add test for global scope not being invoked on relationship-as-query #222

Closed MordantWastrel closed 1 year ago

MordantWastrel commented 1 year ago

Global scopes are invoked on relationships.

Global scopes are invoked on entities loaded with .retrieveQuery()

Global scopes are not invoked on entity relationships loaded with .retrieveQuery() (User.posts().retrieveQuery().get())

This PR adds a test demonstrating this to GlobalScopeSpec.cfc

Relates to https://github.com/coldbox-modules/quick/issues/221