polymorphic « Load « JPA Q&A





1. load() is not polymorphic?    forum.hibernate.org

I encountered some unexpected behavior when loading objects within a class heirarchy (hibernate 2.1). For example: Animal -->Cat -->Dog If I run a query like: "FROM Animal as animal" I will get back all Cats and Dogs in this table, as expected. Also as expected, each object returned from this query will be an instance of either a Cat or Dog. ...

2. Polymorphic Proxies for Lazy Loading    forum.hibernate.org

Newbie Joined: Sun Jun 13, 2004 12:53 pm Posts: 2 I've been working with Hibernate for a week or so now migrating an existing persistence framework and I came across an issue. Does Hibernate have a built in mechanism for creating proxies which are of the correct type in a polymorphic association? For example, if I have the following classes: Code: ...

3. Problem with polymorphic lazy load despite proxy interfaces    forum.hibernate.org

Newbie Joined: Mon Sep 19, 2005 4:30 am Posts: 11 Hello, has anyone had the same problem? I work with a mapping of 200 persistent classes where the most important classes live in two hierarchies, connected by an association at the highest level. I tried several ways to get around the problem described below. Meanwhile I believe it might be a ...

4. Many joins to load an association of polymorphic entities    forum.hibernate.org

Hibernate version: 3.2.0.ga I can't post my exact hbm/java here since it's proprietary. But here is a summary: Filter.hbm.xml : FitlerExpression.hbm.xml : ...

5. Fast polymorphic Session.get or Session.load with l2 cache    forum.hibernate.org

We are using hibernate 3.2.5GA with level 2 cache turned on for most objects. Our ids are unique across all tables so most of our code just does Dao.get(id). At the moment we have slow kludge to load the appropriate object by id using the HQL: "select obj from BaseClass obj where id=:id" We don't mind the cost of this when ...