Joomla framework method setQuery builds and populate the object automagically
http://help.joomla.org/content/view/708/125/
The problem is object var names are taken directly from database field names, and database field names have the minus character inside the name like "COD-NOMINA".
$consulta = "SELECT * FROM tmp_aportes WHERE COD-NOMINA='3108801'";
$db->setQuery($consulta);
$aportes = $db->loadObject();
So it is necesary I need to escape those chars to avoid php attemps to operate a substraction (-) when evaluates the code
for example in this code
echo $aportes->COD-NOMINA ;
because if is not escaped php checks for a "property" $aportes->COD instead the required $aportes->COD-NOMINA
Thanks for any ideas.