openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Kotek" <>
Subject Table per class problem
Date Fri, 04 Apr 2008 15:43:53 GMT
It seems there is bug in table-per-class inheritance. I have this herarchy:

class Car1 {
  int maxSpeed

class Car2 {..} extends Car1

class Car3{..} extends Car2

Car1 and Car2 are stored in the same table, Car3 is in separated table.

I can run queries:
SELECT c FROM Car1 c3 (returns even Car3 instances)

And also query with condition
SELECT c3 FROM Car3 c3 WHERE c3.maxSpeed > 300

But query on root class  fails with an SQL error exception (Derby
database). OpenJPA generated SQL query with __empty FROM part__, table
name is simply missing.

JPQL query:
SELECT c FROM Car1 c WHERE c.maxSpeed > 300

I traced this problem, SQL query for first table (Car1) was executed
properly, OpenJPA failed on second query from table Car3.

Have someone alse discovered this bug, where should I put it?

Jan Kotek

View raw message