BE Study 12th

Why use VO?

there are some objects that are suitable for VO. For example, there is an 'application form'. If there are two different application form that contains exactly the same content. Should we accept both? It would be ridiculous. We should regard it a duplication.


JPA


JPA is a essential library that enables spring to manipulate the DB.

There's a critical concept called "entity manager".

Entity manager is an object offerred by JPA that enables the management of entities.


Dirty Checking

You don't have to actually em.persist. or em.update. When em is flush()ed, it makes an snapshot of the entities that are enrolled in the persistence context; thus the snapshot would be same with the current state of the DB. The next time when ex is flush()ed, the em compares the snapshot and the current state of the entities. Then it creates an UPDATE query which would make the snapshot same with the current state. Then it pushes the UPDATE query into the store query.

1. directly calls flush()

2. JPQL Query

3. Transaction committed

댓글

이 블로그의 인기 게시물

Interface of Java

Data Analytics Overview(OLTP vs OLAP)

Leetcode