This one time, at band camp, Fejes Balazs said:
FB>I have a problem using OQLQuery.
FB>I can successfully perstist my objects and query them, but the following
FB>does not work properly:
FB>SELECT p from myapp.bizobjects.valueobjects.CustomerVO p WHERE
FB>p.PersonVO.firstname="John" AND p.PersonVO.name="Smith"
FB>
FB>Castor generates the following query:
FB>SELECT
FB>CUSTOMER.CUSTOMERID,CUSTOMER.CUSTOMERNUMBER,CUSTOMER.COMPANY,CUSTOMER.PASSWORD,CUSTOMER.PHONE,CUSTOMER.MOBILEPHONE,CUSTOMER.FAX,CUSTOMER.EMAIL,CUSTOMER.ADDITIONALTEXT,CUSTOMER.LANGUAGEID,CUSTOMER.PERSON_PERSONID
FB>FROM CUSTOMER,PERSON WHERE CUSTOMER.PERSON_PERSONID=PERSON_0.PERSONID
FB>AND PERSON_0.FIRSTNAME = 'John' AND PERSON_0.NAME = 'Smith'
FB>
FB>I think instead of PERSON_O there should be PERSON, I don't know where
FB>this _O comes from. Anyone has any tips? Unfortunately the castor JDO
FB>example does not contain a scenario like this.
Balazs,
Can you please post the relevant portion of your mapping descriptor.
The PERSON_0 is an SQL alias. See the following for more information:
http://www.w3schools.com/sql/sql_alias.asp
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev