Ver Mensaje Individual
  #11 (permalink)  
Antiguo 23/05/2011, 12:20
SeNdEr2003
 
Fecha de Ingreso: agosto-2003
Mensajes: 906
Antigüedad: 20 años, 8 meses
Puntos: 3
Respuesta: Doctrine2 error al hacer getQuery

Por ej:

Código PHP:
<?php
/**
 * Usuario Class
 * 
 * Represents a billing account in the system.
 * 
 * @author Lucas
 *
 * @Entity 
 */

class Usuario_model_usuario extends Usuario_Model_Usuario
{
    
    protected 
$usuario         null;

    
/**
     * @param string $rol
     * @param Usuario_Model_Usuario $usuario
     */
    
public function __construct($rolUsuario_Model_Usuario $usuario) {
        
parent::__construct($rol);
        
$this->usuario $usuario;
    }
    
    public function 
__toString() {
        return 
sprintf("%s (%s/%s)"$this->email$this->rol$this->usuario->getDatosUsuario());
    }
    

}
Ese es mi entity dentro de la carpeta models