join « Entity « JPA Q&A





1. SqlResultSetMapping with self join table    stackoverflow.com

I have a query with a self join that looks like this, select t1., t2. from table t1 left outer join table t2 on t2.LFT < t1.LFT and t2.RGT > t1.RGT AND ...

2. JPA entity joining issues (i think)    stackoverflow.com

Im learing JPA and having problems, im using entity generation stuff(too tired, cant think of the name) in my persistance file so my entitys are upto scratch. But im having problems ...

3. Obtaining parent entities with multiple one to many joins    stackoverflow.com

This is the scenario I currently have:

@Entity
public class A {
  private Set<B> bs;

  @OneToMany
  public Set<B> getBs() {
    return bs;
  }

  public void ...

4. JPA/HIbernate: Joining 2 Entities Multiple Times    stackoverflow.com

I have a legacy database which can't be changed because it's hooked up to a 3rd party application. One of the queries I'm working with for a new application looks like the ...

5. JPA Criteria join    stackoverflow.com


I have two entity classes with many to one relation. I need to select all the parent records that has a child record with a min value smaller than provided.
@Entity
class ...

6. How to use joins between unrelated entities    forum.hibernate.org

I have a case where there is ParentEntity and a ChildEntity. There is no inheritance defined between both child & parent, though the existence of child totally depends on parent. And parent can exist without child even. And also there is no containment of each other in each entity even. In this case I wrote a hql named-query like: select new ...

7. Left Join Unmapped Entities    forum.hibernate.org

Hello folks, I am trying to join two EJB's using EJBQL (with an underlying MySQL data source). The two tables in question are Machine - Hostname - ... unrelated fields ... and Location - Code - Human readable description The tables should be LEFT joined on the location code and the first three characters of the machine's hostname. In straight up ...

8. Lucene and Joined Entities    forum.hibernate.org

I have been reading and investigating and not had much luck. Is there a way to tie joined entities into the same index as the main entity. For example: Code: @Entity @Indexed(index="indexes/foo") public class Foo private Long id; private Set bars = new HashSet(); @Id ...

9. Join two tables in one entity    forum.hibernate.org

Hello, I got the following question. I have a table A where I got an ID column and some more. In another table B I got a FK column to A. I can define relationships in hibernate as I want but I got stuck as I want to use filters. I want to select objects from A but the filter criteria ...





10. Criteria joins and excluding unwanted entities    forum.hibernate.org

11. Retrieving the joined Entity with a Criteria    forum.hibernate.org

@Entity public class Price { @ManyToMany @JoinTable(name = "price_rental_unit", joinColumns = {@JoinColumn(name = "price_id") }, inverseJoinColumns = {@JoinColumn(name = "rental_unit_id") } ) @IndexColumn (name = "index_column") private List rentalUnits; } @Entity public class RentlaUnit { ...