关系错别字3
Relationships Typo3
谁能告诉我关于打字错误 3 的关系?例如我有 2 tables,'A' 和 'B',目前我有简单的形式可以将数据插入 'A' table,'A' table 字段为 "name"、"id_types"、"address"。 "id_types" 是 foreign_key 来自 'B' table。而 'B' table 字段是 "id_types","types_name"。我怎样才能在错别字 3 上建立这种关系?
与persistence_object_identifier有关吗?
这是我尝试手动添加到第二个的代码 table
public function createartistAction(Artist $artist)
{
$artisttype = new Artisttype();
$artisttype->setArtisttype_name($artist->getArtisttype_id());
$this->ArtisttypeRepository->add($artisttype);
$datenow = date('d/m/Y');
$date = date_create($datenow);
$artist->setCreated_at($date);
$artist->setUpdated_at($date);
$this->addFlashMessage('Artist Created.');
$this->ArtistRepository->add($artist);
$this->redirectToUri('/artist/viewArtist');
}
如有任何帮助,我们将不胜感激。
谢谢
我想这是为了让你开始:
http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartII/Modeling.html
TYPO3 Flow 中的所有关系都是在mvc 模型中完成的,它使用各种设计模式来方便程序员。因此,在您的情况下,最好的方法是甚至不接触数据库本身,而是利用 php 框架提供的机会。
这不是一个快速的解决方案,也许在开始之前必须阅读很多书。但是一旦您理解了它,它就是一种让您的数据结构化的非常方便的方法。
谁能告诉我关于打字错误 3 的关系?例如我有 2 tables,'A' 和 'B',目前我有简单的形式可以将数据插入 'A' table,'A' table 字段为 "name"、"id_types"、"address"。 "id_types" 是 foreign_key 来自 'B' table。而 'B' table 字段是 "id_types","types_name"。我怎样才能在错别字 3 上建立这种关系?
与persistence_object_identifier有关吗?
这是我尝试手动添加到第二个的代码 table
public function createartistAction(Artist $artist)
{
$artisttype = new Artisttype();
$artisttype->setArtisttype_name($artist->getArtisttype_id());
$this->ArtisttypeRepository->add($artisttype);
$datenow = date('d/m/Y');
$date = date_create($datenow);
$artist->setCreated_at($date);
$artist->setUpdated_at($date);
$this->addFlashMessage('Artist Created.');
$this->ArtistRepository->add($artist);
$this->redirectToUri('/artist/viewArtist');
}
如有任何帮助,我们将不胜感激。
谢谢
我想这是为了让你开始:
http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartII/Modeling.html
TYPO3 Flow 中的所有关系都是在mvc 模型中完成的,它使用各种设计模式来方便程序员。因此,在您的情况下,最好的方法是甚至不接触数据库本身,而是利用 php 框架提供的机会。
这不是一个快速的解决方案,也许在开始之前必须阅读很多书。但是一旦您理解了它,它就是一种让您的数据结构化的非常方便的方法。