An extension to SQLCriterion that replaces column names.

Description

Tested with 2.0.0 Alpha 2

This "SQLExtendedCriterion" class builds on SQLCriterion and changes the functionality slightly. Instead of merely replacing {alias} with the current root alias, anything in curly brackets is replaced by the column name.

So, if you have a property "Name" which is a formula "Forename + ' ' + Surname", you can use {Name} in your SQLExtendedCriterion and it will be resolved to "Forename + ' ' + Surname".

I'm not sure if my implementation is fully correct, and i'm pretty sure it's not optimal but it works as far as I can see, and it could be useful to others.

Environment

None

Attachments

1

Activity

Show:

Tuna Toksoz October 10, 2008 at 12:24 PM

Can you add a test to show us what the problem is?

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created June 24, 2008 at 3:43 AM
Updated June 15, 2009 at 11:11 PM
Who's Looking?