fix problem with ORM
exetende QueryBuilder.toString(appendWhere)
updated test