简体   繁体   中英

Having issues with hibernate running update queries right after select queries

I am having issues with JPA (hibernate) select which is generating lots of update queries too. I have @OneToOne mapping between my entities.

I am also using following annotation on some of my getters method, not sure if they would make object dirty.

1.@Type(type = "yes_no")
2.@JsonFormat(pattern = "MM/dd/yyyy")
3.@Enumerated(EnumType.STRING)

Any idea in correct direction will be appreciated. My queries are returning collections.

尝试首先分离查询返回的对象...使用: EntityManager.clear()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM