Duplicate « Association « JPA Q&A





1. duplicate import / association references unmapped class    forum.hibernate.org

Newbie Joined: Thu Mar 18, 2004 6:58 am Posts: 1 Problem: I have a class Employee which contains a Map of Company objects. Employee and Company do not share a common super class. However, I get an error in the mapping. When I don't specify a mapping for Company in hibernate.cfg.xml, I get an "Association references unmapped class "error (see stack ...

2. joining associations without duplicate elements    forum.hibernate.org

Hi, i am in trouble with a SQL-Statement and Hibernate. I am using two associatiuon the tabel/object order and the table/object item. The item store a property field status. The SQL statement returns the orders with the status XX orderd by the date: SELECT o FROM ShopOrder o INNER JOIN FETCH o.items item WHERE item.status = :orderItemStatus ORDER BY o.date But ...

3. Duplicate instance in one-to-many association    forum.hibernate.org

Newbie Joined: Wed Nov 23, 2005 5:01 am Posts: 15 Hi, I have a many-to-one/one-to-many problem between a class and another class that belongs to a class hierarchy. The association is bidirectional. So I have the following hierarchy: Code: class Role; class Patient extends Role; class Nurse extends Role; and a class Participation that has many to one association with base ...

4. Criteria with junctions throws "duplicate association p    forum.hibernate.org

I've got a domain model which looks a bit like this: A == B getB() C getC() B == String getName() C == D getD() D == String getName() String getTown() and I'm trying to create the following where clause using the Criteria API: where c.d.name = "wibble" or (c.d.town="blah" and b.name="wobble") The code I'm using is this: Criteria rootCriteria = ...