プロジェクトのアップグレード ここでトランザクションについて考えています。問題は、Spring で Hibernate クエリにいつトランザクションを使用する必要がある
かよくわかりません。
トランザクションとは何かを完全に理解していないわけではありませんが、おそらく理解していると思いますが、属性を設定するだけのタイプクエリにトランザクションを使用する必要がありますか?
get*
read-only
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="get*" read-only="true" />
<!-- other methods use the default transaction settings -->
<tx:method name="*" />
</tx:attributes>
</tx:advice>
get*
それはクエリにとって効率的ですか?
私が考える限り、トランザクションの使用はCREATE
、 、UPDATE
、DELETE
およびそのようなクエリのように行う必要があるためです。
ここで何か不足していますか?