On Wednesday, April 17, 2002, at 02:07 AM, Sam Joseph wrote: > Okay, so my fix doesn't work on as wide a range of clauses as possible. > New approach in attached file. > Seems that specifying precedence is not enough. Seems to me like a > node model of the "or"s and "and"s cannot handle the kind of > functionality described in the peers howto document.
Yes, that is correct. > I have got the right kind of functionality by switching to give each > criterion a vector of "or" and "and" clauses. However while this works > fine for my application it seems like a lot of other parts of Criterion > will need to change to fit in with this. Is there testing code against > which I can test any new Criterion class I develop, and can anyone tell > me which other parts of the Criterion class mesh with important parts > of the rest of torque? Sam, I looked into this problem about a year ago (I think). I made a lot of noise on the list about Criteria needing to be completely replaced. But I never followed through with code. Thanks for taking it on. I think these are the main areas where you'll need to look. And unfortunately, there's no test code. org.apache.torque.util.BasePeer org.apache.torque.util.SqlExpression org.apache.torque.util.Criteria org.apache.torque.adaptor.DB* Some time in the next week or so I have a test I will be adding because I need to fix some behavior with Dates. Afterwards I may be able to facilitate with some tests. I find BasePeer can be confusing. In some places it is using Village (http://share.whichever.com/village) to generate prepared statements, and in other places it generates the SQL on its own. Good luck. And thanks again. -Eric -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
