Oops, I accidently sent the message while I am still editing... Please
ignore the previous posting.
I encountered another JDO generated SQL problem. This time, the object
has only one reference each to related objects.
when I issue the OQL query
select c from Summary c where c.category.objectId=$1
(here I bind long data type to $1)
the castor JDO creates following SQL, which has the alias, category_0, that
is not declared anywhere in the query.
SELECT
summary.objectId,
summary.category,
summary.descriptionEn,
summary.descriptionJp,
summary.nameEn,
summary.nameFr,
summary.nameJp,
product.objectId,
summary.timeCreated,
summary.timeUpdated
FROM
summary LEFT OUTER JOIN product ON
(summary.objectId=product.summary),category
WHERE
summary.category=category_0.objectId AND category_0.objectId = ?
However, when I issue the OQLQuery as
select c from Summary where c.category=$1
(and bind the Category object to the variable, instead of the Category's
objectId which is of a long data type)
It works fine.
I expect the former query work. Am I missing something?
I appreciate your input.
Thank you.
------------------------
Yasuhiko YOSHIKAWA
[EMAIL PROTECTED]
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev