ドメインモデルMessage
で拡張を作成しました。このモデルは、TYPO3 pages
(タイトル、issite_rootなどのページの詳細を持つもの)テーブルとの関係がm:nです。しかし、mapping to existing tables
オプションを使用して、そのページを言ってくれtype
エラーを与える:TYPO3 6.1のExtbaseからの "pages"テーブルへのマッピング
The configured type field for table "pages" is of type int(11) unsigned
This means the type field can not be used for defining the record type.
You have to configure the mappings yourself if you want to map to this
table or extend the correlated class
私は後でsetup.txt
からそれをマッピングすることができるようにだから私はちょうど、マッピングせずに関係を作成します。
MyExt/Classes/Domain/Repository/
内のすべてのゲッター/セッターとリポジトリとMyExt/Classes/Domain/Model/
にモデルPages
を作成しましたI。私のSETUP.TXTで
は、私はこれでした:
config.tx_extbase {
persistence{
enableAutomaticCacheClearing = 1
updateReferenceIndex = 0
classes {
Tx_Playfield_Domain_Model_Pages {
mapping {
tableName = pages
columns {
uid.mapOnProperty = uid
pid.mapOnProperty = pid
sorting.mapOnProperty = sorting
title.mapOnProperty = title
subtitle.mapOnProperty = subtitle
}
}
}
}
}
}
をしかし、私は存在しませんtx_playfield_domain_model_pages
ために私が作成したページのモデル、
var_dump($this->pagesRepository->findByUid(74));
その検索にアクセスしようとすると、それは示します
Table 'typo3.tx_playfield_domain_model_pages' doesn't exist: SELECT tx_playfield_domain_model_pages.* FROM tx_playfield_domain_model_pages WHERE tx_playfield_domain_model_pages.uid = '74' LIMIT 1
私は何ですか?ここで歌う?次の後
更新
http://t3-developer.com/extbase-fluid/cheats-extbase/model/tabelle-pages-in-extbase/ @Michael私が提案するがempty result
$this->pagesRepository->findByUid(74)
から
setup.txt
がロードされ得ます。私はそれを確認するためにこれを行いました:
plugin.tx_playfield{
settings{
temp=yes
}
}
これは私のコントローラからアクセスされています。
setup.txtがよろしいですか。あなたのモデルはMyExt/Classes/Domain/Model/Pages.phpでどのように定義されていますか? setup.txtが実行時に実際にロードされていることを確認しましたか(TSオブジェクトブラウザhttp://stackoverflow.com/a/6671818/283854) 'config.tx_extbase'の代わりに' config.tx_playfield'を使って同じものを設定しようとしましたか? – Mateng
はい。私は更新されました、それはsetup.txtがロードされているようですが、extbaseはマップされていないことがわかります。 私も 'config.tx_playfield'を試しましたが動作しません! – dora
Btw:デバッギングの目的で、 '\ TYPO3 \ CMS \ Extbase \ Utility \ DebuggerUtility :: var_dump($ var、 'Name');を使うのが良いです。それには多くの利点があります。 – Mateng