[gelöst] Plugin - Neues Model erstellen

[color=red]EDIT: Es läuft - ein @ORM\Entity vergessen (in dem unten stehendem Code berichtigt)[/color] - Vielen Dank nochmal. Hallo Oliver, danke für die schnelle Antwort, doch leider läuft es nicht. Ich bekomme folgende Fehlermeldung: Class Shopware\CustomModels\Article\Test is not a valid entity or mapped super class. in Doctrine/ORM/Mapping/MappingException.php on line 147 Folgende Schritte habe ich durchgeführt: Plugins/Local/Frontend/Example/Bootstrap.php public function install() { Shopware()-\>Db()-\>query("CREATE TABLE test ( id INT NOT NULL AUTO\_INCREMENT PRIMARY KEY )"); } public function afterInit() { $this-\>registerCustomModels(); } Plugins/Local/Frontend/Example/Models/Article/Test.php namespace Shopware\CustomModels\Article; use Shopware\Components\Model\ModelEntity, Doctrine\ORM\Mapping AS ORM, Symfony\Component\Validator\Constraints as Assert, Doctrine\Common\Collections\ArrayCollection; /\*\* \* @ORM\Entity \* @ORM\Table(name="test") \*/ class Test extends ModelEntity { /\*\* \* @ORM\Column(name="id", type="integer", nullable=false) \* @ORM\Id \* @ORM\GeneratedValue(strategy="IDENTITY") \*/ private $id; public function getId() { return $this-\>id; } public function setId($id) { $this-\>id = $id; } } Der Aufruf ist dann: $repository = Shopware()-\>Models()-\>getRepository('Shopware\CustomModels\Article\Test'); $test = $repository-\>findAll(); Kannst du mir veraten wo der Fehler liegt und wie ich es richtig mache? Vielen Dank im Voraus. Gruß Maximilian Stegmaier