Bugzilla – Bug 569
asgning a number to a property mapped to a characater/varchar/character varying column leads to a strange result
Last modified: 2007-12-11 11:53:15
You need to log in before you can comment on or make changes to this bug.
1. What you were trying to do assign a number value (1) to a property of a mapped HopObject (property mapped to a column with datatype character varying) 2. The (buggy) result you got 1.0 is inserted 3. The result you were expecting no period etc. should be inserted when the number is an integer ("ganzzahl") -> 1
Rhino keeps numbers internally as floating point numbers, and only converts to integers at runtime. The only way to fix this in Helma would be to invoke org.mozilla.javascript.ScriptRuntime.toString() in helma.objectmodel.db.NodeManager when setting a string column, which is pretty much out of question. I suggest you fix this by converting to string when assigning the property. Marking as WONTFIX.