Issue Details (XML | Word | Printable)

Key: OPENJPA-25
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Catalina Wei
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenJPA

Incorrect SQL generated for queries involving more than one AbstractSchemaNames, generated SQL FROM clause is missing 'Table alias'

Created: 21/Aug/06 06:12 PM   Updated: 01/Mar/07 02:20 AM
Return to search
Component/s: query
Affects Version/s: None
Fix Version/s: 0.9.7

Time Tracking:
Not Specified

Resolution Date: 01/Mar/07 02:20 AM


 Description  « Hide
select e, d from EmpBean e, DeptBean d generates following SQL where t2 is undefined:
          SELECT t1.empid, t2.deptno FROM EmpBean t0 JOIN EmpBean t1 ON (1 = 1)
 'DeptBean t2' is missing in the FROM clause.
Similar problem occurs to the following query:
  select d from EmpBean e left join e.dept d, ProjectBean p where e.salary = p.budget ==> incorrect SQL (t3 is undefined):
SELECT t1.deptno, t1.budget, t1.mgr_empid, t1.name, t1.reportsTo_deptno FROM EmpBean t0 LEFT OUTER JOIN DeptBean t1 ON t0.dept_deptno = t1.deptno JOIN EmpBean t2 ON (1 = 1) WHERE (t2.salary = t3.budget)

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
David Wisneski added a comment - 01/Feb/07 01:27 AM
not a problem anymore