0
誰能告訴我關於錯字3的關係嗎?例如我有2個表,'A'和'B',目前我有簡單的表單,可以將數據插入到'A'表中,'A'表中的字段是「名稱」,「id_types」,「地址」。 'id_types'是'B'表中的foreign_key。 'B'表字段是「id_types」,「types_name」。我如何在錯字3上做出這種關係?關係Typo3
是否與persistence_object_identifier有關?
這是我嘗試手動添加到第二個表
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');
}
任何幫助,將不勝感激代碼。
感謝