开发者

Is it possible to load an object, it transient state from the get go?

开发者 https://www.devze.com 2022-12-16 21:44 出处:网络
When querying for a object by id or returning a list of objects using Hibernate, is it possible to tell hibernate to retrieve the object(s) in transient state.

When querying for a object by id or returning a list of objects using Hibernate, is it possible to tell hibernate to retrieve the object(s) in transient state.

I don't want to track any changes at all, this is a rea开发者_开发技巧d only type query and speed is of essence.


https://www.hibernate.org/hib_docs/v3/api/org/hibernate/Session.html

setReadOnly(Object, boolean)


You can also use Stateless Session

0

精彩评论

暂无评论...
验证码 换一张
取 消