Good Morning.
When I add a new property to an existing JPA entity JRebel reloads all the entities again (as it should) so I get the new property working on my code. So far so good.
But if I modify a value into the database then I don’t get the new value reflected on my entity when I execute a findById.
I expected that since all the persistence unit is reloaded I could get also the new values I introduced from MySQL Workbench.
I workarounded that by adding this to my persistence unit, forcing it to go straight to the database instead of hitting the cache:
<!– For JRebel purpose only, remove for production –>
<property name=”javax.persistence.cache.retrieveMode” value=”BYPASS”/>
<property name=”javax.persistence.cache.storeMode” value=”BYPASS”/>
The problem is that this code cannot run into our production system, and we are searching for a way so that JRebel deals with it without having to have those lines for development but not for production.
Do you have any suggest for this?
Thanks in advance.