Skip to content

Instantly share code, notes, and snippets.

@loalf
Created June 28, 2011 11:20
Show Gist options
  • Save loalf/1050930 to your computer and use it in GitHub Desktop.
Save loalf/1050930 to your computer and use it in GitHub Desktop.
Doctrine_Query::create()
->select('m.*, t.field as translated_field')
->from('Model m')
->leftJoin('m.Translation t)
->where('t.field = ?', $value)
@joanteixi
Copy link

eso mismo... doctrine no se lo curra solo... o sea que toca escribir... yo además añado ya la cultura si lo necesitas en el join para minimizar la consulta

->leftJoin('m.Translation t WITH t.lang = 'es... o ca... o lo que sea')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment