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

SQL Database Error in mashstep #461

Closed
nob0dy73 opened this issue Jun 5, 2020 · 1 comment
Closed

SQL Database Error in mashstep #461

nob0dy73 opened this issue Jun 5, 2020 · 1 comment
Assignees

Comments

@nob0dy73
Copy link

nob0dy73 commented Jun 5, 2020

First time commenting so please bear with me.

Program crashes with a cryptic error of "Parameter count mismatch" when trying to use the Mash Des or the Mash wiz as shown below:

[15:20:58.375] ERROR : int Database::insertElement(BeerXMLElement*) could not insert a record into mashstep: INSERT INTO mashstep (decoction_amount,deleted,display,end_temp,folder,infuse_amount,infuse_temp,name,ramp_time,step_number,step_temp,step_time,mstype) VALUES(:decoctionAmount_l,:deleted,:display,:endTemp_c,:folder,:infuseAmount_l,:infuseTemp_c,:name,:rampTime_min,:stepNumber,:stepTemp_c,:stepTime_min,:typeString) Parameter count mismatch

When manually inserting the same entry into the SQL database sqlite3 produces an error:

sqlite> INSERT INTO mashstep (decoction_amount,deleted,display,end_temp,folder,infuse_amount,infuse_temp,name,ramp_time,step_number,
step_temp,step_time,mstype) VALUES(:decoctionAmount_l,:deleted,:display,:endTemp_c,:folder,:infuseAmount_l,:infuseTemp_c,:name,:ramp
Time_min,:stepNumber,:stepTemp_c,:stepTime_min,:typeString);

Error: table mashstep has no column named folder

Taking folder out of the expression fixes the error and an entry can be made.

Looking into how the SQL entries are made in brewtarget I've discovered that in TableSchema::defineMashstepTable() that there is a m_properties[kpropFolder]. By commenting this line out this fixes the issue.

I haven't tested further to see how this affects the program but I'm assuming that this will start affecting thing poorly.

@mikfire
Copy link
Contributor

mikfire commented Jun 11, 2020

Hum. Mashsteps should not have folders.

@mikfire mikfire self-assigned this Jun 11, 2020
dpettersson added a commit that referenced this issue Jun 21, 2020
Closes #461  -- SQL Database Error in mashstep
hawesy pushed a commit to hawesy/brewtarget that referenced this issue Aug 13, 2020
Mashsteps don't have folders. Removed the declaration from
TableSchema::defineMashSteps()
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