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.
Get()を使用した遅延実行にFutureを使用して、単一のレコード(またはLoad())を取得するにはどうすればよいですか?
また、切り離されたQueryOverでFutureを使用できますか
LoadはDBに移動しないため、FuturewithLoadは意味がありません。
Getを使用したFutureも意味がありません。これは、Getがすでにロードされている可能性のあるインスタンスを返すためです。この場合、GetはDBにも移動しません。それに最も近いのは、idによるクエリです。
を取得するFuture<T>には、実行可能クエリ(Criteria / QueryOver / HQL / LINQ)が必要です。そうでなければ、futureにはそれを解決する方法がありません。
Future<T>