Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression in reset behavior, 5.2.0->5.2.7 #208

Open
davidAtInleague opened this issue Oct 24, 2022 · 3 comments
Open

regression in reset behavior, 5.2.0->5.2.7 #208

davidAtInleague opened this issue Oct 24, 2022 · 3 comments

Comments

@davidAtInleague
Copy link
Contributor

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);
@elpete
Copy link
Collaborator

elpete commented Apr 26, 2023

Hmmm...this may just be a docs update needed. Does resetQuery() get you what you'd expect?

@davidAtInleague
Copy link
Contributor Author

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).

@elpete
Copy link
Collaborator

elpete commented Apr 28, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants