What is lazy loading in Hibernate?
What is lazy loading in Java? I don’t understand the process. Can anybody help me to understand the process of lazy loading? 14 Answers 14
What is lazy loading in Java? I don’t understand the process. Can anybody help me to understand the process of lazy loading? 14 Answers 14
This may be a really elementry question but whats a nice way to include multiple children entities when writing a query that spans THREE levels (or more)? i.e. I have 4 tables: Company, Employee, Employee_Car and Employee_Country Company has a 1:m relationship with Employee. Employee has a 1:m relationship with both Employee_Car and Employee_Country. If … Read more
In this application we are developing, we noticed that a view was particularly slow. I profiled the view and noticed that there was one query executed by hibernate which took 10 seconds even if there only were two object in the database to fetch. All OneToMany and ManyToMany relations were lazy so that wasn’t the … Read more
What is wrong here is that your session management configuration is set to close session when you commit transaction. Check if you have something like: <property name=”current_session_context_class”>thread</property> in your configuration. In order to overcome this problem you could change the configuration of session factory or open another session and only than ask for those lazy … Read more