【问题标题】:Typo3 6.2.4 / Extbase: Extending fe_users, error property not foundTypo3 6.2.4 / Extbase:扩展 fe_users,找不到错误属性
【发布时间】:2018-03-21 09:20:01
【问题描述】:

我想用一些字段扩展 fe_users 表。 我的模特:

class Laeufer extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUser {
...

控制器

/**
 * action new
 *
 * @param \Vendor\LhSponsorenlauf\Domain\Model\Laeufer $newLaeufer
 * @ignorevalidation $newLaeufer
 * @return void
 */
public function newAction(\Vendor\LhSponsorenlauf\Domain\Model\Laeufer $newLaeufer = NULL) {
    $this->view->assign('laeufer', $newLaeufer);
}
...

TS

plugin.tx_lhsponsorenlauf {
  persistence {
    classes {
      Vendor\LhSponsorenlauf\Domain\Model\Laeufer {
        mapping {
          tableName = fe_users
        }
      }
    }
  }
}

但是当我点击我的新动作表单的创建按钮时,我得到了以下错误:

Exception while property mapping at property path "":Property "first_name" was not found in target object of type "Vendor\LhSponsorenlauf\Domain\Model\Laeufer"

【问题讨论】:

    标签: php typo3 typoscript extbase typo3-6.2.x


    【解决方案1】:

    我是在编写和阅读自己的问题后自己发现的。我忽略了typo3 属性名称约定,并将列名作为我的属性名称。但是 first_name 是 firstName 作为属性名称

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多