aspose file tools*
The moose likes Object Relational Mapping and the fly likes transient fields and entityManager.refresh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "transient fields and entityManager.refresh" Watch "transient fields and entityManager.refresh" New topic

transient fields and entityManager.refresh

nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580

I have a entity and within this entity I have transient fields. (@Transient).

When I use entityManager.refresh(entity) or Hibernate.initialize(entity), does it also override the transient fields, or are there kept?

I do not want, that the values of transient fields are set to null after a refresh. Is that the case?
It is sorta covered in the JavaRanch Style Guide.
subject: transient fields and entityManager.refresh
Similar Threads
Enthuware question com.enthuware.ets.scbcd.v5.2.79
5 simple J2EE test questions
Why EntityManager.refresh, and EntityManager.remove require attached entity?
Hibernate - Problems with @onetomany
JPA Delete Entity and Refresh Collections containing Entity