Issue
BETWEEN clauses with relational alias operands do not parse, resulting in an exception "could not find short alias".
Example
The following code will throw an exception. User hasOne Subscription.
1 2 3 | $q1 = Doctrine_Query::create() ->select('u.id') ->from('User u') ->where("CURRENT_DATE() BETWEEN u.Subscription.begin AND u.Subscription.end") ->addWhere( 'u.id != 5' ); |
Since the between operands are relational aliases, and not literals or short aliases, Doctrine does not attempt to parse correctly. I modified the behavior to do extra parsing on the expressions when BETWEEN is encountered as the operation.
The Goods
Guilherme from the team messaged me last night to let me know he's going to commit the patch. I just checked and it's not there yet, so if you need this fix immediately, you can apply the patch above.











