Added custom QueryBuilder support and fixed primary key in result set.