Its probably because you do not have a primary key column.
On Sun, Jan 9, 2011 at 7:02 PM, Javier Garcia <[email protected]> wrote:
> Hi,
>
> i have this schema below, i have generated the classes using symfony
> and created a pair of objects using the form class generated.
>
> moto:
> marca: { type: varchar(255), required: true }
> matricula: { type: integer, required: true }
>
> Now i have this criteria:
>
> $c = new Criteria();
> $c->addSelectColumn('MAX('.MotoPeer::MATRICULA.')');
> $max_matricula = MotoPeer::doSelect($c);
> var_dump($max_matricula);
> return $max_matricula;
>
> When i call the criteria code It works ok, but these three notices
> below are showed.
>
> Any idea?
>
> sf 1.4/propel 1.4
>
>
> ( ! ) Notice: Undefined offset: 2 in /opt/lampp/htdocs/prueba/lib/
> model/om/BaseMotoPeer.php on line 379
> Call Stack
> # Time Memory Function Location
> 1 0.0008 328076 {main}( ) ../frontend_dev.php:0
> 2 0.1974 4333236 sfContext->dispatch( ) ../
> frontend_dev.php:13
> 3 0.1974 4333264 sfFrontWebController->dispatch( ) ../
> sfContext.class.php:170
> 4 0.1981 4350256 sfController->forward( ) ../
> sfFrontWebController.class.php:48
> 5 0.2134 4641000 sfFilterChain->execute( ) ../
> sfController.class.php:
> 238
> 6 0.2138 4641808 sfRenderingFilter->execute( ) ../
> sfFilterChain.class.php:53
> 7 0.2138 4641808 sfFilterChain->execute( ) ../
> sfRenderingFilter.class.php:33
> 8 0.2143 4642588 sfExecutionFilter->execute( ) ../
> sfFilterChain.class.php:53
> 9 0.2144 4643308 sfExecutionFilter->handleAction( ) ../
> sfExecutionFilter.class.php:42
> 10 0.2144 4643308 sfExecutionFilter->executeAction( ) ../
> sfExecutionFilter.class.php:78
> 11 0.2144 4643336 sfActions->execute( ) ../
> sfExecutionFilter.class.php:
> 92
> 12 0.2147 4644160 motoActions->executePrueba( ) ../
> sfActions.class.php:
> 60
> 13 0.2212 5026172 MotoPeer::prueba( ) ../actions.class.php:
> 14
> 14 0.2254 5285592 BaseMotoPeer::doSelect( ) ../
> MotoPeer.php:26
> 15 0.2493 5756176 BaseMotoPeer::populateObjects( ) ../
> BaseMotoPeer.php:
> 241
> 16 0.2493 5756568
> BaseMotoPeer::getPrimaryKeyHashFromRow( ) ../
> BaseMotoPeer.php:400
>
> ( ! ) Notice: Undefined offset: 1 in /opt/lampp/htdocs/prueba/lib/
> model/om/BaseMoto.php on line 184
> Call Stack
> # Time Memory Function Location
> 1 0.0008 328076 {main}( ) ../frontend_dev.php:0
> 2 0.1974 4333236 sfContext->dispatch( ) ../
> frontend_dev.php:13
> 3 0.1974 4333264 sfFrontWebController->dispatch( ) ../
> sfContext.class.php:170
> 4 0.1981 4350256 sfController->forward( ) ../
> sfFrontWebController.class.php:48
> 5 0.2134 4641000 sfFilterChain->execute( ) ../
> sfController.class.php:
> 238
> 6 0.2138 4641808 sfRenderingFilter->execute( ) ../
> sfFilterChain.class.php:53
> 7 0.2138 4641808 sfFilterChain->execute( ) ../
> sfRenderingFilter.class.php:33
> 8 0.2143 4642588 sfExecutionFilter->execute( ) ../
> sfFilterChain.class.php:53
> 9 0.2144 4643308 sfExecutionFilter->handleAction( ) ../
> sfExecutionFilter.class.php:42
> 10 0.2144 4643308 sfExecutionFilter->executeAction( ) ../
> sfExecutionFilter.class.php:78
> 11 0.2144 4643336 sfActions->execute( ) ../
> sfExecutionFilter.class.php:
> 92
> 12 0.2147 4644160 motoActions->executePrueba( ) ../
> sfActions.class.php:
> 60
> 13 0.2212 5026172 MotoPeer::prueba( ) ../actions.class.php:
> 14
> 14 0.2254 5285592 BaseMotoPeer::doSelect( ) ../
> MotoPeer.php:26
> 15 0.2493 5756176 BaseMotoPeer::populateObjects( ) ../
> BaseMotoPeer.php:
> 241
> 16 0.2578 5953424 BaseMoto->hydrate( ) ../BaseMotoPeer.php:408
>
> ( ! ) Notice: Undefined offset: 2 in /opt/lampp/htdocs/prueba/lib/
> model/om/BaseMoto.php on line 185
> Call Stack
> # Time Memory Function Location
> 1 0.0008 328076 {main}( ) ../frontend_dev.php:0
> 2 0.1974 4333236 sfContext->dispatch( ) ../
> frontend_dev.php:13
> 3 0.1974 4333264 sfFrontWebController->dispatch( ) ../
> sfContext.class.php:170
> 4 0.1981 4350256 sfController->forward( ) ../
> sfFrontWebController.class.php:48
> 5 0.2134 4641000 sfFilterChain->execute( ) ../
> sfController.class.php:
> 238
> 6 0.2138 4641808 sfRenderingFilter->execute( ) ../
> sfFilterChain.class.php:53
> 7 0.2138 4641808 sfFilterChain->execute( ) ../
> sfRenderingFilter.class.php:33
> 8 0.2143 4642588 sfExecutionFilter->execute( ) ../
> sfFilterChain.class.php:53
> 9 0.2144 4643308 sfExecutionFilter->handleAction( ) ../
> sfExecutionFilter.class.php:42
> 10 0.2144 4643308 sfExecutionFilter->executeAction( ) ../
> sfExecutionFilter.class.php:78
> 11 0.2144 4643336 sfActions->execute( ) ../
> sfExecutionFilter.class.php:
> 92
> 12 0.2147 4644160 motoActions->executePrueba( ) ../
> sfActions.class.php:
> 60
> 13 0.2212 5026172 MotoPeer::prueba( ) ../actions.class.php:
> 14
> 14 0.2254 5285592 BaseMotoPeer::doSelect( ) ../
> MotoPeer.php:26
> 15 0.2493 5756176 BaseMotoPeer::populateObjects( ) ../
> BaseMotoPeer.php:
> 241
> 16 0.2578 5953424 BaseMoto->hydrate( ) ../BaseMotoPeer.php:408
>
> Javier
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<symfony-users%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>
--
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en