Vote count:
0
i have a question concerning JPA and the entity manager. If i use the find method of the entity manager, the data from database will be loaded and the entity is a part of the persistence context of the entity manager and can be deleted, modified or somthing else.
But what is the situation, if an entity will be loaded from database by using Criteria API from Hibernate or the JPQL from JPA or the HQL from Hibernate?
Is the entity or are the entities, which was founded by using Criteria API from Hibernate or the JPQL from JPA or the HQL from Hibernate, automatically a full part of the persistence context of the entity manager and can be deleted or modified as i used the find method of the entity manager?
What is the situation in this JPQL example:
JPQL:
select k, kto.kontostand from Kunde k
left join fetch k.wohnort
left join fetch k.konten kto
where k. geschlecht = 'm' and kto. kontostand < 0
Are K and the complete Entity kontostand a fully part of the entity manager?
Thanks a lot ! Maik
Aucun commentaire:
Enregistrer un commentaire