Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorprepaid
     
    I'm having the a problem with a decimal column. I have a db table with decimal(10,2) but when Akelos is inserting / updating it crops the decimal point. And wouldn't changing to float cause adding errors in the database (since this is monitary values we don't want that)?
    • CommentAuthorKaste
     

    I prefer to store monetary values as integers.

    we had this here.

    maybe its worth to open a ticket ;-)

    • CommentAuthorprepaid
     
    thanks for getting back. i'm confused. how can you store a monetary value (assuming dollars plus cents) as an integer, the cents would get cropped off.

    and isn't storing them a float a bad idea, because if one does any SQL math on it, we'll get all sorts of rounding errors?

    i guess i'll open a ticket?
    • CommentAuthorKaste
     

    thanks for getting back. i'm confused. how can you store a monetary value (assuming dollars plus cents) as an integer, the cents would get cropped off.

    store cents. convert to human-readable string in the view. ;-)