public function testOrderingBySubKey()
{
$pred = $this->getPredicate()->where('translations.de', '!=', false);
$qe = new QueryExecuter($this->getRepo('countries'), $pred, array(), array('translations.de ASC'));
$result = $qe->run();
$this->assertEquals('Afghanistan', $result->first()->translations->de);
$this->assertEquals('Österreich', $result[$result->count() - 1]->translations->de);
$pred = $this->getPredicate()->where('currency.0', '!=', false);
$qe = new QueryExecuter($this->getRepo('countries'), $pred, array(), array('currency.0 DESC'));
$result = $qe->run();
$this->assertEquals('Zimbabwe', $result->first()->id);
$this->assertEquals('United Arab Emirates', $result[$result->count() - 1]->id);
}