Mickael,
Thank you for your reply. Here is the excerpt from the mapping.xml.
Please let me know if you need to check anything else. Since I am new to
Castor, I am not sure what data to provide to ask for help.
<class name="sakura.data.user.Customer"
identity="objectId"
access="shared"
key-generator="HIGH/LOW"
auto-complete="false">
<map-to table="customer" />
<cache-type type="count-limited" />
<field name="emailAddress"
type="java.lang.String"
required="true"
get-method="getEmailAddress"
set-method="setEmailAddress"
direct="false"
lazy="false"
transient="false">
<sql name="emailAddress"
type="varchar"
read-only="false"
dirty="check" />
</field>
<field name="objectId"
type="long"
required="true"
get-method="getObjectId"
set-method="setObjectId"
direct="false"
lazy="false"
transient="false">
<sql name="objectId"
type="numeric"
read-only="false"
dirty="check" />
</field>
<field name="password"
type="java.lang.String"
required="true"
get-method="getPassword"
set-method="setPassword"
direct="false"
lazy="false"
transient="false">
<sql name="password"
type="char"
read-only="false"
dirty="check" />
</field>
<field name="primaryAddress"
type="sakura.data.user.Address"
required="true"
get-method="getPrimaryAddress"
set-method="setPrimaryAddress"
direct="false"
lazy="false"
transient="false">
<sql name="primaryAddress"
read-only="false"
dirty="check" />
</field>
<field name="shippingAddress"
type="sakura.data.user.Address"
required="false"
get-method="getShippingAddress"
set-method="setShippingAddress"
direct="false"
lazy="false"
transient="false">
<sql name="shippingAddress"
read-only="false"
dirty="check" />
</field>
<field name="shoppingCartList"
type="sakura.data.shoppingcart.ShoppingCart"
get-method="getShoppingCartList"
set-method="setShoppingCartList"
collection="arraylist"
required="false"
direct="false"
lazy="false"
transient="false">
<sql many-key="customer"
read-only="false"
dirty="check" />
</field>
<field name="timeCreated"
type="java.sql.Timestamp"
required="true"
get-method="getTimeCreated"
set-method="setTimeCreated"
direct="false"
lazy="false"
transient="false">
<sql name="timeCreated"
type="timestamp"
read-only="false"
dirty="check" />
</field>
<field name="timeUpdated"
type="java.sql.Timestamp"
required="true"
get-method="getTimeUpdated"
set-method="setTimeUpdated"
direct="false"
lazy="false"
transient="false">
<sql name="timeUpdated"
type="timestamp"
read-only="false"
dirty="check" />
</field>
</class>
> Seems to be a mapping problem, could you send your mapping file ?
>
> Yasuhiko Yoshikawa(Sakakibara) wrote:
> > Hi, I am new to castor JDO and found it wonderful.
> > However, when I try it out, I encountered a problem that the JDO creates
> > incorrect SQL statement:(line breaks and spaces are inserted for
> > readability)
> > SELECT
> > a2.city,
> > a2.companyName,
> > a2.customerId,
> > customer.objectId,
> > customer_f4.objectId,
> > a2.faxNumber,
> > a2.name,
> > a2.namePhonetic,
> > a2.postalCode,
> > a2.stateProvince,
> > a2.street,
> > a2.suite,
> > a2.telephoneNumber,
> > a2.timeCreated,
> > a2.timeUpdated
> > FROM
> > address a1
> > LEFT OUTER JOIN customer ON
> > (a1.objectId=customer.primaryAddress),
> > address a2
> > LEFT OUTER JOIN customer_f4 ON
> > (a2.objectId=customer_f4.shippingAddress)
> > WHERE
> > a2.objectId=a1.objectId AND a2.objectId=1
> >
> > When there is no customer_f4 table. My OQL is a very simple one
> > select c from sakura.data.user.Customer c
> >
> > When the JDO starts up the message on the Standard Out reads
> > [test] SQL for loading sakura.data.user.Customer:
> > SELECT customer.emailAddress,
> > customer.password,
> > customer.primaryAddress,
> > customer .shippingAddress,
> > shoppingcart.objectId,
> > customer.timeCreated,
> > customer.timeUpdated
> > FROM customer LEFT OUTER JOIN shoppingcart
> > ON (customer.objectId=shoppingcart.customer)
> > WHERE customer.objectId=?
> >
> > Does anyone know what is causing the JDO to think there is customer_f4
> > table?
> > I tried with both 0.9.3.21 and 0.9.4 and my database is HyperSonicDB.
> >
> > I would appreciate any input.
> >
> > ------------------------
> > Yasuhiko YOSHIKAWA
> > [EMAIL PROTECTED]
> >
> > -----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> > unsubscribe castor-dev
> >
> >
>
>
> --
> Mickael Guessant
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
------------------------
Yasuhiko YOSHIKAWA
[EMAIL PROTECTED]
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev