YK's feedback
Closed this issue · 8 comments
Make it clear what in the service or the application uses JPA and for what. IOW, explain not only in terms of JPA and what it can do but also from the perspective of the application what it is used for and why it matters.
The focus is here is on accessing and persisting data for microservices and JPA is what we used to accomplish this in the service -- JPA helps us to map from the objects that we need to work with to the data in the DB and make it easier for us to query for the data and make changes.
How does the below relate to what the users will accomplish with "Performing CRUD operations using JPA"?
Every entity object has a lifecycle that consists of four states: new, managed, detached and removed. Whenever a new Event object is created its state will be new, meaning that it is not mapped to a row in the database table and is not associated with an EntityManger. Managed entities are entities that have been persisted, or fetched by find() or a query, and are managed by the EntityManager. This means that they are actively tracked by the persistence context. Detached entities are no longer managed by a persistence context. When using a container-managed EntityManager, entities automatically become detached at the end of transaction boundaries. Lastly, removed entities will be marked for removal and will be deleted from the database upon transaction commit.
The application that you will be working with is the event manager, which is composed of a UI and an event microservice for creating, retrieving, updating, and deleting events. The application uses an Embedded Derby database as a datastore for all the events.
... with is an event manager? ID team can confirm.
SME recommended dedicating a paragraph towards explaining the different states that an entity object can have (new, managed, detached and removed). Without this knowledge, the CRUD section cannot be properly explained. For example, the update()
method. Managed entities are actively being tracked by the persistence context for changes, you don't actually have to do anything. The changes will be automatically synchronized with the database. However, when your entity becomes detached, you need to merge it into the current persistence context so that its changes can be synchronized to the database.
We need to explain in terms that are relevant to the users (developers) within the context of the guide. The guides are neither manuals nor references but a way for developers to learn the topic -- and practically -- in 20 mins or so.
I will open a separate issue for my last feedback. @andrewdes, please confirm when all latest changes are on QA site.
The changes were merged and are reflected on the QA site.