Entity « Performance « JPA Q&A





1. effeciently updating relationships between hibernate entities    stackoverflow.com

I have an m2m relationship between two hibernate entities, let's call them Movies and Actors, which I've setup with bidirectional links. Obviously this is modeled as a movies table, and ...

3. Performance dilemma when inserting related entities    forum.hibernate.org

Hi! Im am using Hibernate in "native mode" (not JPA), lets discuss the issue with two example entities (All Entities hav a String with a UUID as PK, the PK is generated in the constructor). 1. Developer 2. Project Developer contains a unidirectional relation to Project: @OneToOne(optional = true, cascade = { }, fetch = FetchType.LAZY) private Project project; The Session ...

4. [Performance] Select only some properties of the entity    forum.hibernate.org

Hi, I would like to only select some properties of my object entity for performance reason. I know I can use HQL and the "select" clause. Unfortunately I find this way of working not efficient because I reveive a list of Object[] that I have to iterate over. It becomes much worth if you have a tree like structure in your ...

5. Performance on Entities with lots of columns...    forum.hibernate.org

I have this class Award mapping the Award table that has a lots of columns(30). When I do list awards I don't need more than few things (id, description) if I use a projection sql-query like below that will do it. If I use hql that is way too slow because the extra work perform to fetch 30 columns per award. ...

7. High-performance deleting of many entities    forum.hibernate.org

Hi, I am searching for a high-performance deleting of many (up to 5.000-10.000) entities. I have tries the following: 1. Usage EntityManager.merge(Entity) & EntityManager.remove(Entity) Problem: - The performance is very slow. - High performance problems with EntityListener ------------------------------------------------------------------------ 2. Usage of "WHERE id IN (:ID_LIST)" clause Example: DELETE FROM a WHERE a.b_id in ([static_list_of_ids]) Problem: - Problems (Exception) if to many ...