Zum Inhalt springen

The identity property "synony" is no UID.

Erstellt am 25. März 2017 · 1 Antwort · letzte Antwort am 17. Mai 2017

Tags: Fluid, Frage

getit ·

Hallo,

habe folgendes Szenario:
Tabellen:

Leistung <--(1-n)--> Leistunganhang

Mein Model

class Leistunganhang extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
  /**
   * typ
   * 
   * @var string
   */
   protected $typ = '';

  /**
   * kurzbeschreibung
   * 
   * @var string
   */
   protected $kurzbeschreibung = '';

   /**
    * langbeschreibung
    * 
    * @var string
    */
   protected $langbeschreibung = '';


   /**
    * Returns the typ
    * 
    * @return string $typ
    */
   public function getTyp()
   {
     return $this->typ;
   }

   /**
    * Sets the typ
    * 
    * @param string $typ
    * @return void
    */
   public function setTyp($typ)
   {
     $this->typ = $typ;
   }

   /**
    * Returns the kurzbeschreibung
    * 
    * @return string $kurzbeschreibung
    */
   public function getKurzbeschreibung()
   {
     return $this->kurzbeschreibung;
   }

   /**
    * Sets the kurzbeschreibung
    * 
    * @param string $kurzbeschreibung
    * @return void
    */
   public function setKurzbeschreibung($kurzbeschreibung)
   {
     $this->kurzbeschreibung = $kurzbeschreibung;
   }

   /**
    * Returns the langbeschreibung
    * 
    * @return string $langbeschreibung
    */
   public function getLangbeschreibung()
   {
     return $this->langbeschreibung;
   }

   /**
    * Sets the langbeschreibung
    * 
    * @param string $langbeschreibung
    * @return void
    */
   public function setLangbeschreibung($langbeschreibung)
   {
     $this->langbeschreibung = $langbeschreibung;
   }
}

Habe jetzt zum Testen folgendes Forumlar

<f:form action="add" object="{leistung}" name="leistung" additionalAttributes="{role:'form'}">
  <f:form.hidden property="leistunganhang.typ" value="synonym"/>
  <div class="form-group">
    <label>Kurzbeschreibung</label>
    <f:form.textfield property="leistunganhang.kurzbeschreibung" class="form-control"/>
  </div>
  <div class="actions">
    <f:form.submit value="Anlegen" class="btn btn-primary"/>
  </div>
</f:form>

Schicke ich das Formular ab, erhalte ich im initlizeAddAction() beim Debug von $this->request folgendes (gekürzte) Ausgabe:

TYPO3\CMS\Extbase\Mvc\Web\Requestprototypeobject
  ...
  arguments => protectedarray(3 items)
    leistung => array(2 items)
      ...
      typ => 'synonym' (6 chars)
      kurzbeschreibung => 'blablub' (7 chars)

und in der addAction() dann folgende Fehlermeldung:
#1297759968: Exception while property mapping at property path "leistunganhang.typ": The identity property "synony" is no UID.

Kann mir jemand sagen, wo da der Fehler liegt?