Lehre 2 PlainValue erwartet

Ich habe Probleme beim ausführen einer Lehre DQL-Query. Dies ist der Fehler, es gibt mich.

Doctrine\Common\Annotations\AnnotationException: [Syntax Error] Expected PlainValue, 
got 'integer' at position 13 in property Base\Session::$lifetime.

Mein code sieht wie folgt aus:

$query = $em->createQuery("SELECT s FROM Base\Session s WHERE s.session = \"$id\"");

Wobei $id die aktuelle session_id. Mein Modell sieht so aus:

namespace Base;

/** @Entity @Table(name="session") */
class Session extends Skeleton {
/**
 * @Id @Column(type="integer")
 * @GeneratedValue(strategy="AUTO")
 */
protected $id;

/** @Column(length=32) */
protected $session;

/** @Column(type=integer) */
protected $lifetime;

/** @Column(type=integer) */
protected $modified;

/** @Column(type="text") */ 
protected $data;
}

InformationsquelleAutor Rene Terstegen | 2010-08-17

Schreibe einen Kommentar