Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1 [LEGACY]
-
None
-
Windows XP java 1.4
Description
I have a table "content" with 2 fields: "id" and "parent_id". "id" is the primary key for the table. I defined a db relationship from "parent_id" to "id" named "toParent". On the content entity I defined a relationship parentContent using the db relationship toParent. When I call getParentContent the generated sql query displayed in the log is something like that:
SELECT DISTINCT t0.ID, t0.PARENT_CONTENT_ID FROM CONTENT t0, CONTENT t1 WHERE t0.ID = t1.PARENT_CONTENT_ID AND ((t0.ID = ?)
but what I would expect would be:
SELECT DISTINCT t0.ID, t0.PARENT_CONTENT_ID FROM CONTENT t0, CONTENT t1 WHERE t0.ID = t1.PARENT_CONTENT_ID AND ((t1.ID = ?)