# Plugin Model Getter Function Array

**URL:** <https://forum.shopware.com/t/plugin-model-getter-function-array/88098>\
**Category:** Programmierung\
**Created:** [3. Juni 2021 um 13:02 UTC](https://forum.shopware.com/t/plugin-model-getter-function-array/88098 "2021-06-03T13:02:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcoHH](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@MarcoHH](https://forum.shopware.com/u/MarcoHH)\
**Post date:** [3. Juni 2021 um 13:02 UTC](https://forum.shopware.com/t/plugin-model-getter-function-array/88098/1 "2021-06-03T13:02:27Z")

</div>

Moin,

ich habe in einem Plugin ein eigenes Model angelegt. Der Setter für ein Array funktioniert. Nur der Getter liefert NULL zurück. Hier das gekürzte Model:

```
<?php

namespace NfswReviews\Models\Reviews;

use Shopware\Components\Model\ModelEntity;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
* @ORM\Table(name="s_plugin_nfsw_reviews")
*/
class Reviews extends ModelEntity
{

    /**
     * @var array $reviews
     * @ORM\Column(name="reviews", type="array", nullable=false)
     */
    private $reviews;

    /**
     * @param array $value
     */
    public function setReviews($value)
    {
        $this->reviews = $value;
    }

    /**
     * @return array
     */
    public function getReviews()
    {
        return $this->reviews;
    }

}

```

Hat jemand eine Idee?

Beste Grüße aus Hamburg,  
Marco
