History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: COR-1131
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Patrick Roemer
Reporter: Ruihua Jin
Votes: 3
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
db4o Core

AND, NOT constraints return wrong query results

Created: 31/Jan/08 12:46 PM   Updated: 19/Feb/09 02:17 PM
Component/s: Queries
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0h
Time Spent - 6.5h
Time Spent: 6.5h
Time Spent - 6.5h

Environment: Windows XP, .NET Framework 2.0

Peers: Carl Rosenberger
Order: 3
First Response Date: 06/Feb/08 04:12 PM
Labels:
Participants: Patrick Roemer, Rodrigo B. de Oliveira and Ruihua Jin
Number of Attachments: 0
Number of Comments: 2


 Description  « Hide
In the C# test program I have

interface IParallelogram { ... }

class Parallelogram : IParallelogram
{
    private int height1;
    private int height2;

    ...
}

class Rectangle : IParallelogram
{
    private int height1;
    private int height2;

    ...
}

I store two instances of Parallelogram with (height1, height2) = (10, 10) and (20, 20), two instances of Rectangle with (10, 10) and (30, 30). Then the following queries return wrong results:

                IQuery q2 = objectContainer.Query();
                q2.Constrain(typeof(IParallelogram));
                IConstraint icon1 = q2.Descend("height1").Constrain(10);
                IConstraint icon2 = q2.Descend("height2").Constrain(10);
                IConstraint icon = icon1.And(icon2);
                IObjectSet os3 = q2.Execute();

returns an empty IObjectSet.

                IQuery q4 = objectContainer.Query();
                q4.Constrain(typeof(IParallelogram));
                IConstraint icon6 = q4.Descend("height1").Constrain(10).Not();
                IObjectSet os5 = q4.Execute();
 
returns all the four instances of IParallelogram.

The C# test program can be downloaded from https://svn.origo.ethz.ch/defcon/test_suites/SODA_Test.zip

In Eiffel for .NET applications, the developer only uses queries for interfaces because of multiple inheritance, so it is important to have SODA queries for interfaces work correctly.







 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Carl Rosenberger - 05/Feb/08 11:12 PM
Time Worked: 1h
w/Patrick: Debugging interface not query and successfully found the cause for one problem.
Patrick Roemer - 06/Feb/08 06:13 PM
Time Worked: 1.5h
Create test case, investigate generated query structure
Patrick Roemer - 06/Feb/08 06:14 PM
Time Worked: 1h
w/ Carl: Debug into query processor
Patrick Roemer - 27/Oct/08 01:21 PM
Time Worked: 3h
w/ cr: debug into query processor handling of combined or/not join