vanillaforums/Garden — Issue #1162: Model independent querys tainted, queries tainted generally. 
Author: x00
Created: 2011-10-15 09:28:47+00:00
State: open

This is just one possible example it is probably broken elsewhere

public function DiscussionModel_BeforeGet_Handler(&$Sender){{
Gdn::SQL()->GetCount('Discussion');

}

Instead of sending a simple, short query as you expect it is loaded with all the Selects, Froms, and Wheres of the current model causing an error, you can try any query. Also it makes no difference if you create a new model. There is a million and one way you can do it, it suffers from the same problem. There is no independent instances, not great OO.

You could call get, but then that will cause an errors further down the line. Reset doesn't help either.

2.0.18b4

So that leaves Query only which not exactly elegant.