support for SQL functions with HAVING query and bug fix in loading object

Signed-off-by: Andreas Zöllner <andi@go-for-fun.de>