added PDO based attributes, fixed DQL aggregate value handling with left joins + added some new tests Ticket: 263