> From: "Rafal Maczewski" <[EMAIL PROTECTED]>
> 
> I have cleaned up the patch. I hope it's ok now (I am new to Turbine coding,
> sorry...)
No apology necessary in my book.
> 
>> 4. Test cases are more than welcome.
> 
> I have attached a simple one. It does two queries one with setLimit and one
> with setLimit and setOffset. They both produce incorrect results.
I think you mean "correct" ;-)
That's great.  I am waiting for Stephen H. to get back to the list
concerning an update to the testing framework used by torque - once he has
this in place we will again be able to add the test cases to cvs so that
they can be executed after a build (the goal being to establish a library of
test cases).  To be suitable for this you need to use JUnit - the easiest
thing to do will be to copy one of the existing tests (I have one called
LargeSelectTest that I am waiting to be committed).

> By the way, while creating the test case I discovered that:
> Tab1Peer.doDelete( new Criteria() );
> does not delete any rows. To remove all rows from the table you have to add
> a condition that is always true. I don't know if this is a feature or a bug,
> but it seemed like a bug to me.
Hmm.  The testing framework is required here also as the best thing to do is
to submit a test case suitable for including in cvs (using Junit) that you
believe should pass.  You would raise this as an issue in Scarab and someone
would hopefully have a look at it at some stage in the near future.
> 
>> 5. Posting then issue into Scarab (scarab.werken.com/issues) will ensure
>> that it does not get lost on the mailing list.
> 
> I'll try that. I am new to Scarab too...
Me too ;-)
> 
>> I haven't had a chance to have a good look at the code that resets the limit
>> and offset, but I think I can see the problem you describe (it reminds me of
>> the TemplateLink.toString() method which clears the path info and query data
>> - i.e. an unexpected side-effect).  It should be pretty easy to put together
>> a test case to demonstrate whether or not this is a problem.
> 
> I noticed that while switching from torque-3.0-b2 to torque-3.0-b4. I had
> the following code:
> Criteria criteria = new Criteria();
> criteria.add(...);
> criteria.setLimit( ... );
> criteria.setOffset( ... );
> 
> log.debug( criteria.toString() );
> List l = Tab1Peer.doSelect( criteria );
> 
> In torque-3.0-b4 the criteria.toString() resets the limit and offset.
So are you saying that the behaviour changed between b2 and b4?  I'm going
to repeat my mantra (one I am hoping Stephen and others will join in on) -
post a test case and someone will look into it.

Submitting issues with test cases to Scarab is great - submitting issues
with test cases and patches to fix the problem (as you are doing in this
case) is even better ;-)
> 
> -- Rafal

Cheers,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to