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.
クラスの更新を回避するために hibernate で挿入と更新を使用する方法。
両方のタイプを使用できますが、2 番目のケースでは検索が簡単です。オブジェクトを簡単に取得できます。ただし、最初のケースでは、ID をデータベースに渡してオブジェクトを取得する必要があります。
それ以外の場合は、挿入用と検索用の両方のオプションを使用できます。
developerObj.setDevID(12);
そしてセットinsertable = false and updatable = false
insertable = false and updatable = false
利用するときはproject.developer.devId
project.developer.devId