-
Notifications
You must be signed in to change notification settings - Fork 134
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
Water chemistry is still broken #736
Comments
Ah, hmm, OK, will have a look. There is actually even a comment in the code saying this is stored in the DB as a number! |
Whilst I'm looking at this, there's a slightly related question I keep meaning to ask. On |
Writing that code made my head hurt. A lot. The alkalinity is measured in ppm. I probably had a reason for breaking the naming convention, but that reason escapes me right now. |
Glad it's not just me! 😃
Thanks. I'm editing the file anyway, so I'll bring the naming into line with the other ppm fields. |
By the way, this is turning out to be a very good bug to investigate. The fact that you run PostgreSQL picks up all sorts of things that SQLite will just let slide (eg storing a double in an int field etc). I'm adding some extra checks in the ObjectStore code to sanity-check check these things. Longer-term, I wonder if there might be a better alternative to SQLite for our native DB. It feels a bit wrong to do everything strongly-typed in C++ and then have SQLite say "Yeah, whatever you told me this column is, I'll just ignore that and let you store anything you want in there. Just like JavaScript." 😸 EDIT: Maybe this https://www.sqlite.org/stricttables.html is what we want in the meantime... |
Eg
QPROPERTY( int ... .
|
OK, I worked out what's going on here. When you store an (On other tables, where we are already mapping enum values to the same string representations that we use for BeerXML serialisation, we don't hit this problem.) The fix is to force the |
Should be fixed in https://github.com/Brewtarget/brewtarget/releases/tag/v3.0.8, but please shout if not! |
At a raw guess, it was missed that I don't store strings in the database for the water tables. I store the integers, mostly because I really do not like using strings in the database like that.
The text was updated successfully, but these errors were encountered: