0

I have a table in my database called student, and when I try using

StudentPeer::retreiveByPk($stid)

I get a fatal error saying

Call to undefined method StudentPeer::retreiveByPk

Is there a way I could load my model dynamically? Is there a way I could see all the models that have been auto-loaded? Also is there a way for auto-loading my model for this module?

I am using symfony 1.3.

j0k
  • 22,600
  • 28
  • 79
  • 90
macha
  • 7,337
  • 19
  • 62
  • 84
  • 'Call to undefined method ... ' sounds like the class could be loaded but the method does not exist. – hek2mgl Dec 18 '12 at 21:50
  • As an aside, while it's worth mentioning you're using symfony, the really useful info to include in questions such as these is the version of _Propel_ you're using. I believe you're using Propel 1.4, since symfony 1.3 and symfony 1.4 are identical except for the removal of deprecated classes. [See here](http://stackoverflow.com/questions/12156611/propel-version-with-symfony-1-4-11). – halfer Dec 18 '12 at 23:00

1 Answers1

1

You've mispelled the method call - it should be StudentPeer::retrieveByPk($stid). The model should auto-load fine, but I wouldn't expect it to on undefined methods.

halfer
  • 19,824
  • 17
  • 99
  • 186