Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私が抱えている問題は、mongoose(Mongodb) との 1 対多のマッピングです。1 つは注文 (バイヤー データ) で、多くはアイテム (価格、数量など) です。
1)注文とアイテムのスキーマを作成するにはどうすればよいですか?たとえば、注文の配列にアイテムを配置する必要がありますか?
2) すべてのデータが 1 つの事後操作に含まれますか?
ObjectId を使用して多対 1 をリンクできると思いますが、その方法がわかりません。