3

How can i get an object using his Id in doctrine 1.2 ?

Without writing sql or Dql. I did not find it in the docs: https://doctrine.readthedocs.org/en/latest/en/manual/working-with-models.html#fetching-objects

maazza
  • 7,016
  • 15
  • 63
  • 96

1 Answers1

3
$user = Doctrine_Core::getTable('User')->find(1);

Here you go for doctrine 1.2

there is a reference here... but nowhere in doc where you would expect it :( http://docs.doctrine-project.org/projects/doctrine1/en/latest/en/manual/working-with-models.html#retrieving-related-records

nvanesch
  • 2,540
  • 14
  • 25