I have the following object definition:
component persistent="true" table="settings" hint="Settings" extends="coldbox.system.orm.hibernate.ActiveEntity" {
property name="id" fieldtype="id" generator="native";
property name="type" ormtype="string" length="10" index="setting_type";
property name="name" ormtype="string" length="20" index="setting_name";
property name="ownerID" ormtype="integer" index="setting_ownerID";
property name="valueNumber" ormtype="float";
//return the appropriate value
public function getValue(){
return this.getValueNumber();
}
The problem I am having is that this.getValueNumber()
is returning the number, but with spaces in front of it.
Wrapping it in trim() trim(this.getValueNumber())
doesn't remove the space before the number.
This doesn't seem to cause an issue when working with the number in CF, but it does when I place the number into a JS function and attempt to work with it in JS.
Has anyone come across this problem? Any way to stop it? It is happening on both cf9, cf10 and Railo 4.0.