Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/05/2013, 14:01
wilmer30
 
Fecha de Ingreso: enero-2010
Mensajes: 491
Antigüedad: 14 años, 3 meses
Puntos: 12
Error ainsertar registro con doctrine 2

Hola:
Intento guardar un registro:
Código PHP:
    public function nuevoRoles($datos){
        
$per = new ApplicationEntityRoles();
        
$per->setName($datos['name']);
//         $per->setDefault(1);
//         $per->setModified('2013-12-05 10:30:30');
//         $per->setCreated('2013-12-05 10:30:30');
//         $per->setId(null);
        
$this->em->persist($per);
        
$this->em->flush();
        
    } 
pero me arroja este error, y no tengo idea de por que:
Cita:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default, modified, created) VALUES ('Wil', NULL, NULL, NULL)' at line 1' in C:\xampp\htdocs\bcbtram\library\Doctrine\DBAL\Stat ement.php:138