At first, this is my first JPA Projekt - and the code should work with Hibernate and JPA, using the specifc DAOs.
Following query string returns no result using ObjectDB - using Hibernate, or EclipseLink this query works fine.
select distinct c from CI c, CIstring s where c.name like :SSTR or (c.id = s.ci.id AND s.text like :SSTR)
The class CI (Confiugration Item):
private String name; @OneToMany(mappedBy="ci") private List<CIdata> content; abstract class CIdata (@Inheritance(strategy=InheritanceType.JOINED) ... @ManyToOne private CI ci;
subclass CIstring
private String text;
I am not sure, if this query is JPA conform, but I have'nt a idea how can I retrive the data in one query.