School location not saving at the right place
Issue #1046
resolved
Seems to always save a fair bit lower.
Comments (7)
-
reporter -
reporter Applying the fix above now throws the following when saving a school.
Seems related to this https://stackoverflow.com/questions/18638741/the-type-company-model-user-and-the-type-company-core-model-user-both-have-t
-
reporter As discussed I have tried simply changing the type to float? (and double?) in the School model but then EF still complain.
-
reporter -
assigned issue to
-
assigned issue to
-
reporter - marked as blocker
-
repo owner Solution is to change the data type on both the EF object AND the Schools table, making the decimal values
float
Sql Delta will correctly handle rebuilding the table. But timing is critical - the sql and code upgrades must happen together.
-
repo owner - changed status to resolved
fix(School Map): can now edit school lat / long without losing precision
Resolves
#1046→ <<cset 6a0db0e7ebbc>>
- Log in to comment
Problem is because EF saves schLat and schLong (type decimal) with only 2 decimal spaces. The behavior needs to be overridden. https://www.andrewcbancroft.com/2017/03/29/entity-framework-tip-specifying-decimal-precision/
Doing that now and pushing a fix.