問題タブ [mutiny]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
hibernate - hibernate リアクティブで一度に manyToMany 関係を持つ複数のモデルを永続化するにはどうすればよいですか?
2 つのエンティティ モデルがAppointmentありreasons、多対多の関係があります。
Appointmentモデル:
Reasonモデル:
WaitListモデル:
WaitListモデルを参照するだけ
reasonId の理由のリストと WaitList の時間のリストを使用して、新しいアポイントメントを作成します。
AppointmentPatternは次のとおりです。
これは、新しい予約を作成し、新しい予約と Reason および WaitList との関係を与えるための私のエンドポイントです。
機能を分解するために2つの機能を作成しました。
addAppointment(appointmentPattern): アポイントを保持し、新しいアポイントを返します。
storeReasonToAppointment(appointment, appointmentPattern.getReasonList()): Appointment および Reason との関係を与える。
誰でも私を助けることができますか?