1. How to selectively fetch items from a certain table via JPA stackoverflow.comEnvironment: JPA 1, Hibernate 3.3.x I have an JPA entity class (User), how do I selectively fetch member variables say (first_name, last_name) instead of fetching all user attributes using the JPA api. ... |
2. using HQL select fetching collections failed stackoverflow.comMy problem is that i am not able to include collection properties of a class in my select query I do have a parent/child relation between two classes (Team and Member) for improving ... |
3. N+1 selects on left join fetch...why? forum.hibernate.orgRegular Joined: Thu Sep 16, 2004 4:56 pm Posts: 80 My HQL is select a from RootTpvtrans a left join fetch a.tpv left join fetch a.lastCall where a = a.parent order by a.tpvstartdt I have eager fetch=LAZY on all the fields in RootTpvtrans. The SQL that hibernate ran during the query is Code: Feb 17, 2010 12:34:11 PM net.sf.log4jdbc.Slf4jSpyLogDelegator sqlOccured INFO: ... |
4. Hibernate fetch join and solution for select (n+1) problem forum.hibernate.org |
5. Eager fetching with Criteria forces serveral selects forum.hibernate.org |
6. select with multijoin and fetch forum.hibernate.orgHello, Consider this task: "select category from database for which are products ordered by type name and category name" Products ( id, name, price, category ) Category ( id, name, type ) Type ( id, name ) Type one-many Category Category one-many Product Ok so, I use HQL like: select distinct category from Product product join fetch product.category category join fetch ... |
7. Hibernate ignoring fetch="select" forum.hibernate.orgIf set to select then Hibernate will use a sequential select for a |
8. N+1 Select Problem using Dynamic Fetching w/ Criteria forum.hibernate.org |
9. fetch="select" problem in Hibernate 3.2 on many-to forum.hibernate.orgHi, I have a class with many-to-one relations included. In Hibernate 3.1rc2 Hibernate generates sequential selects to retrieve the many-to-one relations (without having fetch="select" for these many-to-one relations). When trying to migrate to Hibernate 3.2.2 or 3.2.5 (I have tried both) Hibernate generates a single select with inner joins to retrieve the object and all associated many-to-one relations (even if an ... |
10. [hibernate 3.2.4] Crtieria select with Fetching object forum.hibernate.org |
11. fetch="select" not working on a many-to-one relati forum.hibernate.orgHi, I'm using Hibernate 3.2.1.ga and DB2 database. I have the next entity: |
12. EAGER fetch does not work in one select forum.hibernate.orgHi, I am setting Eager fetching for OneToOne and ManyToOne relationships, and even though I specify @Fetch(FetchMode.JOIN), it does not work and is still performing additional selects. To be more concrete the "main" entity is RfqRequest and it links to CoreCurrency (many-to-one) and RfqRequestOciParam(one-to-one). Please help! The HQL is very simple: Code: entityManager.createQuery("from RfqRequest req").getResultList() And it generates many sqls like ... |
13. Difference between fetch="select" and fetch=" forum.hibernate.orgHello all, I am new to Hibernate and still trying to figure this thing out, so please excuse me if this is a trivial question. In a many-to-many relationship, what is the difference between setting the "fetch" attribute to "select" vs "join"? I can't tell a difference. I am tweaking my HQL to get the desired results using "left join fetch" ... |
14. Criteria API retrieve pairs SELECT i, b FROM ... forum.hibernate.orgIs it possible? That's the whole point of the Hibernate Criteria API. Here's a little tutorial I put together on the Criteria API. It'll really help you understand Criteria quickly, with lots of simple examples. Here's an example of a Criteria query that searches for a user with a LoginName of mj, and a password of abc123. I think you can ... |
15. selectively eager fetching forum.hibernate.orgI have a hibernate entity that represents a table row that maps as against itself. @Entity @Table(name = "blog_post", schema = "webapps") public class BlogPost implements java.io.Serializable { /** * */ private static final long serialVersionUID = -3645846346609906425L; private Long blogPostId; private BlogPost blogPost; private Date postDate; private String title; private String content; private String author; private Set |
16. fetch=join or fetch=select forum.hibernate.orgI have been reading about the using of fetch to get the dependencies of an entity .So its said if you use fetch=join to get these dependencies it will be use jut one sql and if you use fetch=select it will be used n+1 selects. So its better always to use fetch=join, isnt it? Thanks |
17. select new + join fetch forum.hibernate.org |
18. How to fetch collection eagerly by using a separate select forum.hibernate.org |