I hope you got it resolved..or try
 
CALL SQL SELECT id,cpu FROM COMPUTER AS com.YourClassName
 
It has to have "AS"
-----Original Message-----
From: Arun Sudhakaran [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 16, 2002 10:07 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Using CALL SQL in JDO gives Exception

Hi,
 
        I tried using my own queries in castor using the CALL SQL before the query like shown in the example.
 
        computerOql = db.getOQLQuery( "CALL SQL SELECT id,cpu FROM COMPUTER" );
 
I get an exception as shown below
 
[test] org.exolab.castor.jdo.QueryException: Stored procedure call must end with
 "AS <class-name>"

Mapping for computer
 
  <!--  Mapping for Computer, extending Product  -->
  <class name="examples.myapp.Computer" extends="examples.myapp.Product" identity="id">
    <description>Computer definition, extends generic product</description>
    <map-to table="computer" xml="computer" />
    <field name="id" type="integer">
      <sql name="id" type="integer" />
      <xml name="id" node="attribute"/>
    </field>
    <field name="cpu" type="string">
      <sql name="cpu" type="char"/>
      <xml node="element" />
    </field>
  </class>
 
What could be the prob.
 
plz help
 
Arun

Reply via email to