Which option will guarantee that the report does NOT contain stale data?

A developer is creating a lonG. running Java Persistence reporting application that accesses a set
of related entities. The application is NOT expected to add, change, or remove records in the
database but the data can be changed by another application running on the same database.
Which option will guarantee that the report does NOT contain stale data?

A developer is creating a lonG. running Java Persistence reporting application that accesses a set
of related entities. The application is NOT expected to add, change, or remove records in the
database but the data can be changed by another application running on the same database.
Which option will guarantee that the report does NOT contain stale data?

A.
Call the EntityManager flush API before preparing the report.

B.
Call the EntityManager createQuery API before preparing the report.

C.
Call the EntityManager clear API before accessing the fields or properties of the entities used in
the report.

D.
Call the EntityManager refresh on each parent entity that is added to the report, and specify
cascade=REFRESH on all corresponding relationships.



Leave a Reply 0

Your email address will not be published. Required fields are marked *