quick
quick copied to clipboard
regression in `reset` behavior, 5.2.0->5.2.7
The behavior of reset seems to have changed between 5.2.0 -> 5.2.7.
Grammar is mssql.
Repro:
// entity def
component table="RMME_C" extends="quick.models.BaseEntity" accessors=true {
property name="ID_C" type="numeric" sqltype="integer";
variables._key = "ID_C";
}
// table
create table rmme_c (id_c int null);
// do it
v = getInstance("RMME_C")
v.whereID_C(42);
sql = v.reset().retrieveQuery().toSql(showBindings=true);
// v5.2.0 (expected) --> SELECT [RMME_C].[ID_C] FROM [RMME_C]
// v5.2.7 (unexpected) --> SELECT [RMME_C].[ID_C] FROM [RMME_C] WHERE [RMME_C].[ID_C] = {"value":42,"cfsqltype":"integer","null":false}
writedump(sql);
Hmmm...this may just be a docs update needed. Does resetQuery() get you what you'd expect?
resetQuery does seem to be a substitute for places that were previously using reset -- reset clears at least the select and where lists (and presumably all the other things too but I haven't exhaustively checked).
I would have expected this behavior to have changed in v5 where we split the entity from the builder.
So did this solve your problem?