coldbox-modules / qb

Fluent Query Builder for CFML
https://qb.ortusbooks.com/
MIT License
40 stars 35 forks source link

Possible to use 2 versions of QB in order to compare? #245

Open JamoCA opened 1 year ago

JamoCA commented 1 year ago

Is it possible to use 2 different versions of QB in a single app to compare functionality? (I've been burned in the past with ColdFusion updates that have returned different results, so I prefer to test as much as possible.)

I'm using QB with ColdFusion 2021 without Coldbox. I was under the impression that I could continue to use a "qb" (for 2016 backwards compatibility) and a separate "qb9" directory for the breaking v9 changes that now require CF2021.

I'm encountering the following error because the QueryBuilder.cfc is attempting to initialize the new SQLCommenter module from the older "/qb" sub-directory.:

Could not find the ColdFusion component or interface qb.models.SQLCommenter.NullSQLCommenter.
Ensure that the name is correct and that the component or interface exists.
elpete commented 1 year ago

I believe you'll need to provide paths to the init function of the QueryBuilder that match the mapping you make. In the example you gave you would provide a new qb9.models.SQLCommenter.NullSQLCommenter().