This one time, at band camp, Yasuhiko Yoshikawa(Sakakibara) said:
YY>Hi, I am new to castor JDO and found it wonderful.
YY>However, when I try it out, I encountered a problem that the JDO creates
YY>incorrect SQL statement:(line breaks and spaces are inserted for
YY>readability)
YY>SELECT
YY> a2.city,
YY> a2.companyName,
YY> a2.customerId,
YY> customer.objectId,
YY> customer_f4.objectId,
YY> a2.faxNumber,
YY> a2.name,
YY> a2.namePhonetic,
YY> a2.postalCode,
YY> a2.stateProvince,
YY> a2.street,
YY> a2.suite,
YY> a2.telephoneNumber,
YY> a2.timeCreated,
YY> a2.timeUpdated
YY>FROM
YY> address a1
YY> LEFT OUTER JOIN customer ON
YY> (a1.objectId=customer.primaryAddress),
YY> address a2
YY> LEFT OUTER JOIN customer_f4 ON
YY> (a2.objectId=customer_f4.shippingAddress)
YY>WHERE
YY> a2.objectId=a1.objectId AND a2.objectId=1
YY>
YY>When there is no customer_f4 table. My OQL is a very simple one
YY>select c from sakura.data.user.Customer c
YY>
YY>When the JDO starts up the message on the Standard Out reads
YY>[test] SQL for loading sakura.data.user.Customer:
YY> SELECT customer.emailAddress,
YY> customer.password,
YY> customer.primaryAddress,
YY> customer .shippingAddress,
YY> shoppingcart.objectId,
YY> customer.timeCreated,
YY> customer.timeUpdated
YY> FROM customer LEFT OUTER JOIN shoppingcart
YY> ON (customer.objectId=shoppingcart.customer)
YY> WHERE customer.objectId=?
YY>
YY>Does anyone know what is causing the JDO to think there is customer_f4
YY>table?
YY>I tried with both 0.9.3.21 and 0.9.4 and my database is HyperSonicDB.
Yasuhiko,
This is a table alias that is generated by Castor's ParseTreeWalker to
refer to the customer table. See the following for more info:
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