Compare commits

...

1 Commits

Author SHA1 Message Date
William Zimrin
bac45a7094 Fix t2 multiple method error
Under rare (and near-impossible to reproduce) circumstances, we get "multiple matching methods and neither is
preferred errors when selecting stuff from the db.  This should add in a preference.  The ordering between these two
methods shouldn't matter, so either order is reasonable.
2025-06-13 03:12:15 -05:00

View File

@@ -129,3 +129,8 @@
;; loading the model namespace by calling `resolve-model` can add a new implementation to `table-name`, and
;; apparently we need to refer back to the var to pick up the updated multimethod.
(#'t2.model/table-name (t2.model/resolve-model model)))))
(methodical/prefer-method!
#'toucan2.pipeline/build
[:toucan.query-type/select.instances-from-pks :toucan2.tools.transformed/transformed.model :default]
[:toucan.query-type/select.* :toucan2.tools.before-select/model :default])