This seems to be a limitation of the API atm. I shouldn't be that difficult to add support for true parameterized joins. Alternatively to the current 'String conditionExpression' argument, it could take an instance of WhereQuery with a dedicated implementation for joins. This could then be used to build the correct join condition with the question marks and pass on the existence and ordinal of the parameters to the top-level query.

Can you add an issue to Jira for this?

PS.: to encode SQL values, you can use StringUtils.encodeSql(String)

On 18 Jul 2006, at 20:55, Steven Grimm wrote:

Yes, and that's what I'm doing now -- but it means the database has to re-parse each query (because each one will be textually different) which can be a significant performance hit. It also means you can't take advantage of app server PreparedStatement caches, etc.

Also, if you're inserting string values, it requires you to encode the strings using vendor-specific escaping rules to avoid syntax errors and opens the door to code-insertion hacks.

Bind variables are far preferable in almost every situation.

-Steve


Tyler Pitchford wrote:
Couldn't you just do:

"mytable.id = othertable.mytableid " +
 "AND othertable.recordtype = " +
 parameter

I mean it's a string construction you're doing anyway, couldn't you
just append to the string with the parameter?

Cheers,
 Tyler

P.S. Please not I haven't looked at the docs on what the joinOuter
method from RIFE specifically requires.

_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users


--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to