私は Symfony1.4 を使用し、アプリケーションを推進しています。私は問題があります。例: 著者と本を保存したいデータベースがあります。次のスキームを作成します: schema.yml
book:
id: ~
name: {type: varchar (100), required: true}
author:
id: ~
name: {type: varchar (100), required: true}
author_book:
id_book: {type: integer, foreignTable: book, foreignReference: id, required: true, primaryKey: true, onDelete: cascade}
id_author: {type: integer, foreignTable: author, foreignReference: id, required: true, primaryKey: true, onDelete: cascade}
そして、著者を追加するためのページを離れずに、著者の追加で、彼が書いた本を追加したいと思います。これは簡単な質問ですが、何らかの理由で解決策が見つかりません。(「本を追加する」というフォームを ajax を使ってロードするウィジェットを書くことでこれを行うことができると思いますが、すぐに解決策があるのではないでしょうか?)