{
if (expr == null)
{
// Assume that we have something like "CURRENT_DATE()"
SQLExpression dateExpr =
new TemporalExpression(stmt, getMappingForClass(getClassForMapping()), getFunctionName(), args);
// Update the SQL manually since the default is to add brackets after the name
dateExpr.toSQLText().clearStatement();
dateExpr.toSQLText().append(getFunctionName());
return dateExpr;
}
else
{
throw new NucleusException(LOCALISER.msg("060002", getFunctionName(), expr));