199 words

"Problem" with cross join

2011-01-16 07:10

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;
private List<CIdata> content;
abstract class CIdata (@Inheritance(strategy=InheritanceType.JOINED)
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.


pezi's picture
Joined on 2011-01-16
User Post #1
2011-01-16 12:38

Your query is valid and the problem seems to be a bug in ObjectDB (in handling primary key fields in JOIN queries).

Please try the new build (2.0.4_01) that should fix the bug.

The attached test reproduces the problem - its fails with version 2.0.4 and seems to work well with 2.0.4_01.

If you still see issues, please try to demonstrate them by adjusting the attached test.

Thank you for your bug report.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support's picture
Joined on 2010-05-03
User Post #106

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Maximum file size: 32 MB