Hello I'm new to all this but am really interested in Object - relational
mapping.

I'm trying to get the simple jdo.Test app to work

Classes are compiling ok and I've run the create.sql over my Oracle db and
edited my database.xml file.

However, when execute() is called on the following OQLQuery

        productOql = db.getOQLQuery( "SELECT p FROM myapp.Product p WHERE id =
$1" );

I get SQLExceptions thrown:-

SELECT
"PROD"."ID","PROD"."NAME","PROD"."PRICE","PROD"."GROUP_ID","PROD_DETAIL"."ID"
FROM "PROD","PROD_DETAIL" WHERE "PROD"."ID"="PROD_DETAIL"."PROD_ID"(+) AND
("PROD"."ID" = ?)
org.exolab.castor.jdo.PersistenceException: Nested error: java.sql.SQLException:
invalid arguments in call  org.exolab.castor.jdo.PersistenceException: Nested
error: java.sql.SQLException: invalid arguments in call      at
org.exolab.castor.jdo.engine.TransactionContextImpl.getConnection(TransactionContextImpl.java:207)


     at
org.exolab.castor.persist.TransactionContext.query(TransactionContext.java:616)
     at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:457)
     at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:404)
     at jdo.Test.run(Test.java:121) [mbernie]      at
jdo.Test.main(Test.java:56)


I can't work out what's going on here. How does 'p' in my OQLQuery get resolved
to form the SQL above that causes the trouble?


Any help would be very welcome to set a newbee on track!

Kind regards,

Miles

*******************Internet Email Confidentiality Footer*******************


Privileged/Confidential Information may be contained in this message.  If you
are not the addressee indicated in this message (or responsible for delivery of
the message to such person), you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender by
reply email. Please advise immediately if you or your employer does not consent
to Internet email for messages of this kind.  Opinions, conclusions and other
information in this message that do not relate to the official business of my
firm shall be understood as neither given nor endorsed by it.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to