1. HQL Join Fetch question: aliasing association stackoverflow.comGiven I have an object
|
2. left join fetch of nullable grandchild association causes NPE in hibernate stackoverflow.comI have an entity called Foo. It has a nullable many-to-one association to Bar. Bar has a non-nullable many-to-one association to Baz. My goal is to grab all Foo entities ... |
3. Hibernate 2 association fetching without 'join' coderanch.com |
4. Problem using fetch="select" with associations forum.hibernate.orgI've stumbled across a configuration which generates invalid SQL, and I think it should not. Code: |
5. How NOT to retrieve an association ? forum.hibernate.orgHi all, My question may sound funny, since usually people try to do the opposite, but here's what I have: I have a project that I've recently refactored in several sub-projects, so that it's more modular. Since I've done that, I have problems, maybe because of Hibernate, maybe because of bad design, you will tell me ;-) I'm using Hibernate annotations ... |
6. criteria on association w/ fetch=join, get n+1 queries forum.hibernate.orgWhen I specify a restriction on an one-to-many association in a criteria query, Hibernate executes n+1 queries even though the first query is joining the two tables correctly with an inner join. This happens if I use createAlias or createCriteria to specify the restriction on the association. If I don't specify a restriction on the association then I do not get ... |
7. One-to-Many association. Issue with fetch left join forum.hibernate.orgNewbie Joined: Mon Jun 21, 2010 1:36 pm Posts: 14 Hi All, I am coming across an issue in my sample application. Please help. I have 4 objects in my sample application: Customer, Order, OrderItem, Product and their associations are as follows: Customer --> Order (One-to-Many Bi-directional) Order --> OrderItem (One-to-Many Uni-directional) OrderItem --> Product (Many-to-One Uni-directional) And the 4 tables ... |
8. dynamic association fetching forum.hibernate.orgI have the same need, and I have tried it. It doesn't work. Staying with your example: If I specify "orders", it will fetch the orders. But if I specify "orders.products", it doesn't fetch either one. If I specify both "orders" and "orders.products", it will fetch orders only. So how does the association path in setFetchMode work then? Or is it ... |
9. fetching many-to-one associations forum.hibernate.org |
10. Association Fetching and RMI forum.hibernate.orgI have a RMI Client - Server architecture where I am not permitted to share the Hibernate jars on the server with the client. My problem is when I dont want to load collections/associations at all, what do I do to share the persistent beans with the Client? If I do this: At server: Parent P = session.createCriteria(Parent.class).setFetchMode("children",LAZY); session.close(); return P; ... |
11. Eagerly fetching multiple to-many associations forum.hibernate.orgThe Hibernate In Action book mentions a limit of one eagerly fetched collection for a single query. I have a few questions regarding this limitation: 1) Is that on a "per entity" basis? For example, Entity A has a to-many relation to B which has a to-many relation to C. Is it possible to fetch the entire A->B->C subgraph in a ... |
12. Dynamic association fetching... forum.hibernate.orgI've had this need before as well. I wrote a very simple util class to take care of this. The class has a set of static integers (powers of 2) that represent all the possible associations on a particular POJO. Then I have a method that takes the POJO whose associations are to be intialized and an integer which represents all ... |
13. Fetching association problem forum.hibernate.orgI'm trying to laod an entity without carrying the associated object. As suggested in HIA chapter 7, I'm explicitely disabling outer-join fetching by calling the setFetchMode("associate",Fetchmode.LAZY") on my criteria object. But it seeem like that the Criteria object is completely ignoring this setting. The associated object is still there. here is the code: Criteria criteria=session.createCriteria(TStructureLibelle.class); criteria.setFetchMode("structure",FetchMode.LAZY); criteria.add(Expression.eq("structure.codeStructure",codeStructure)); criteria.addOrder(Order.asc("dateFinValidite")); return criteria.list(); here ... |
14. How to eager fetch a many-to-many association forum.hibernate.org |
15. Fetching lazy associations forum.hibernate.org |
16. one-to-zero-or-one association and lazy fetching forum.hibernate.orgselect ... from Person left outer join Note on ... left outer join Person on ... where ... |
17. fetch="join" and N+1 queries with association crit forum.hibernate.org |
18. Autofetch - automatic fetch joins and association laziness forum.hibernate.org |
19. Fetching data from ternary associations forum.hibernate.orgHibernate version:3.2.5.ga Mysql 5.0: Code: Class Theme { @CollectionOfElements(targetElement = TernaryAssociation.class, fetch = FetchType.LAZY) @JoinTable(name = "themes_locations_types", joinColumns = @JoinColumn(name = "theme_id")) public Set |
20. N+1 on fetch of one-to-one association? forum.hibernate.orgNewbie Joined: Tue Mar 03, 2009 12:50 pm Posts: 5 Location: New York After reading all of "Java Persistence with Hibernate", reading the relevant chapters over and over again, searching online and through these posts, and trying all sorts of permutations on this, I'm convinced this is just a fundamental misunderstanding on my part, but anything you may be able to ... |
21. fetch one-to-many association using Criteria forum.hibernate.orgI am a Hibernate newbie, and trying to see whether it is possible to use Criteria projections to return a collection of one-to-many associated objects, and cannot get the data. My entity mapping is like below: Class A |
22. setFetchMode(JOIN): do implicit association paths exist? forum.hibernate.orgparents = s.createCriteria(Parent.class) .setFetchMode("moreChildren", FetchMode.JOIN) .setFetchMode("moreChildren.friends", FetchMode.JOIN) .addOrder( Order.desc("name") ) .list(); |