cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: SelectQuery and getting where clause
Date Tue, 09 Oct 2007 13:49:46 GMT
Could you elaborate on what are you trying to do? Do you want to  
capture generated SQL without executing it?

Note that Cayenne-generated SQL uses PreparedStatement syntax with  
"?" placeholders for most parameters, letting JDBC driver to bind  
them correctly.

Andrus


On Oct 9, 2007, at 2:11 PM, David Marko wrote:

> Hello, I need to create  a select query that have some parameters  
> and I need to
> get SQL where statement from it containing replaced parameters.  
> (see snippet
> below) . Is there any way how to accomplish this?
>
>
> [Code snippet]
> SelectQuery sq = new
> SelectQuery(Role.class,Expression.fromString(this.whereClause));
> return sq.queryWithParameters(params);
>


Mime
View raw message