Follow my code:
Company cc = em.find(Company.class, clientUser.getCompany().getId());
System.out.println(cc.getCompany_code());
HashMap findProperties = new
What are you expecting to be different and why?
Note that CACHE_RETRIEVE_MODE only affects the shared (2nd level) cache, not the persistence context (1st level cache/transactional cache), object identity must always be maintained in the persistence context for objects that have already been read.
If you have changed your database, and expect the new data then try the BYPASS using a new EntityManager, or try using refresh().
EclipseLink also provides the query hint "eclipselink.maintain-cache"="false" to bypass the persistence context as well.
What version of EclipseLink are you using? I believe there was a bug in BYPASS in the 2.0 release that was fixed in 2.1. Try the latest release.