persistence@glassfish.java.net

Re: Putting a few question marks in a query (doesn't work)

From: Andrei Ilitchev <andrei.ilitchev_at_oracle.com>
Date: Mon, 7 Jan 2008 15:13:59 -0500

It's https://glassfish.dev.java.net/issues/show_bug.cgi?id=990
----- Original Message -----
From: "mewshie" <nathan.smith_at_nist.gov>
To: <persistence_at_glassfish.dev.java.net>
Sent: Monday, January 07, 2008 2:46 PM
Subject: Putting a few question marks in a query (doesn't work)


>
> Hello,
>
> I'm doing a native query (using the createNativeQuery & executeUpdate set
> of
> methods) that has a field with a bunch of question marks. For example,
> here
> is part of one of the delete calls:
>
> delete from cust_standards_data where test_number='?????C'
>
> Even though I'm using "createNativeQuery", toplink yells at me (as if I'm
> trying to use named queries) with an error:
>
> Exception in thread "main" Local Exception Stack:
> Exception [TOPLINK-6132] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs
> (09/07/2007))): oracle.toplink.essentials.exceptions.QueryException
> Exception Description: Query argument ????C' not found in list of
> parameters
> provided during query execution.
>
> If named queries are to blame for this, does anyone know how to turn them
> off completely? I looked in persistence.xml and found nothing there about
> this, and an extensive online search hasn't revealed anything. Thanks for
> any help
>
> -- Nate
>
> P.S. I can't change the database data to _not_ have question marks, and
> have
> to keep it the way it is, unfortunately
>
>
> --
> View this message in context:
> http://www.nabble.com/Putting-a-few-question-marks-in-a-query-%28doesn%27t-work%29-tp14674342p14674342.html
> Sent from the java.net - glassfish persistence mailing list archive at
> Nabble.com.
>