[TYPO3-german] The identity property "synony" is no UID.

David Brünner david.bruenner at t-online.de
Sat Mar 25 11:55:09 CET 2017


Hallo,

habe folgendes Szenario:
Tabellen:

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

Mein Model
[code]
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;
   }
}
[/code]

Habe jetzt zum Testen folgendes Forumlar
[code]
<f:form action="add" object="{leistung}" name="leistung" additionalAttributes="{role:'form'}">
<f:form.hidden property="leistunganhang.typ" value="synony"/>
  <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>
[/code]

Schicke ich das Formular ab, erhalte ich im initlizeAddAction() beim Debug von $this->request folgendes (gekürzte) Ausgabe:
[code]
TYPO3\CMS\Extbase\Mvc\Web\Requestprototypeobject
  ...
  arguments => protectedarray(3 items)
    leistung => array(2 items)
      ...
      typ => 'synonym' (6 chars)
      kurzbeschreibung => 'blablub' (7 chars)
[/code]

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?


More information about the TYPO3-german mailing list