Bugs item #565325, was opened at 2002-06-06 17:14
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=565325&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Bogdan Ghidireac (ghidi)
Assigned to: Nobody/Anonymous (nobody)
Summary: generated-sql not executed correctly

Initial Comment:
Hi,

I have created a finder that is using declared-sql.

The problem is that the generated sql does not 
substiture "?" with the actual value of the parameter as 
you can see in the log generated by HypersonicSQL.

[jbosscmp-jdbc.xml]
<entity>
    <ejb-name>Employee</ejb-name>
    <query>
        <query-method>
            <method-
name>findEmployeesByPattern</method-name>
            <method-params>
                <method-param>java.lang.String</method-
param>
            </method-params>
        </query-method>
        <declared-sql>
            <where>firstName LIKE '{0}%'</where>
        </declared-sql>
    </query>
</entity>

JbossCMP log
17:08:05,054 DEBUG [findEmployeesByPattern] 
Executing SQL: SELECT employeeId, firstName, 
lastName, address, sSN, email FROM EMPLOYEE 
WHERE firstName LIKE '?%'

HypersonicSQL log
17:08:05,064 INFO  [STDOUT] 3:SELECT employeeId, 
firstName, lastName, address, sSN, email FROM 
EMPLOYEE WHERE firstName LIKE '?%'

I am using Jboss3.0.0 final.

Regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=565325&group_id=22866

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to