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
Return to search
Issue 864 of 1828 issue(s)
<< Previous | COR-1131 | Next >>
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
Change by Anat Gafni - 05/Feb/08 09:47 AM
Field Original Value New Value
Order 3

Change by Patrick Roemer - 05/Feb/08 04:27 PM
Assignee Patrick Roemer [ patrick roemer ]

Change by Patrick Roemer - 05/Feb/08 04:27 PM
Fix Version/s 7.1.29 [ 10290 ]
Peers [rodrigo@db4o.com]
Iteration 29

Change by Patrick Roemer - 05/Feb/08 04:28 PM
Affects Version/s 7.1.28 [ 10280 ]
Affects Version/s 7.1.26 [ 10260 ]

Change by Carl Rosenberger - 05/Feb/08 11:12 PM
Remaining Estimate 0h [ 0 ]
Time Spent 1h [ 3600 ]

Change by Patrick Roemer - 06/Feb/08 02:17 PM
Original IDS Estimate 3

Change by Patrick Roemer - 06/Feb/08 03:34 PM
Status Open [ 1 ] In Progress [ 3 ]

Change by Patrick Roemer - 06/Feb/08 04:02 PM
Status In Progress [ 3 ] Open [ 1 ]

Change by Rodrigo B. de Oliveira - 06/Feb/08 04:02 PM
Fix Version/s 7.1.29 [ 10290 ]
Original IDS Estimate 3
Iteration 29

Change by Patrick Roemer - 06/Feb/08 06:14 PM
Time Spent 1h [ 3600 ] 2.5h [ 9000 ]

Change by Patrick Roemer - 06/Feb/08 06:14 PM
Time Spent 2.5h [ 9000 ] 3.5h [ 12600 ]

Change by Patrick Roemer - 12/Feb/08 03:54 PM
Fix Version/s 7.1.30 [ 10292 ]
Peers [rodrigo@db4o.com] [carl@db4o.com]
Affects Version/s 7.1.29 [ 10290 ]
Affects Version/s 7.1.28 [ 10280 ]
Iteration 30

Change by Patrick Roemer - 13/Feb/08 01:24 PM
Original IDS Estimate 3

Change by Patrick Roemer - 13/Feb/08 03:40 PM
Fix Version/s 7.1.30 [ 10292 ]
Affects Version/s 7.1.29 [ 10290 ]
Iteration 30

Change by Carl Rosenberger - 19/Feb/08 01:44 PM
Order 3 6

Change by Rodrigo B. de Oliveira - 15/Apr/08 04:12 PM
Assignee Patrick Roemer [ patrick roemer ] Rodrigo B. de Oliveira [ rodrigo@db4o.com ]

Change by Rodrigo B. de Oliveira - 15/Apr/08 04:13 PM
Peers [carl@db4o.com] [patrick, patrick roemer]

Change by Anat Gafni - 22/Apr/08 07:31 AM
Order 6 4

Change by Anat Gafni - 06/May/08 01:59 PM
Order 4 3

Change by Norberto Goussies - 06/May/08 03:34 PM
Assignee Rodrigo B. de Oliveira [ rodrigo@db4o.com ] Norberto Goussies [ norberto.goussies ]

Change by Norberto Goussies - 07/May/08 12:22 PM
Iteration 42

Change by Norberto Goussies - 07/May/08 03:13 PM
Iteration 42

Change by Patrick Roemer - 17/Jun/08 05:21 PM
Iteration 48

Change by Patrick Roemer - 17/Jun/08 05:21 PM
Assignee Norberto Goussies [ norberto.goussies ] Patrick Roemer [ patrick roemer ]

Change by Patrick Roemer - 17/Jun/08 05:21 PM
Peers [patrick, patrick roemer]

Change by Patrick Roemer - 18/Jun/08 03:19 PM
Original IDS Estimate 3
Iteration 48

Change by Patrick Roemer - 21/Oct/08 03:39 PM
Peers [carl@db4o.com]
Iteration 66

Change by Patrick Roemer - 22/Oct/08 03:04 PM
Original IDS Estimate 3

Change by Patrick Roemer - 28/Oct/08 01:22 PM
Time Spent 3.5h [ 12600 ] 6.5h [ 23400 ]

Change by Patrick Roemer - 28/Oct/08 03:18 PM
Original IDS Estimate 3
Iteration 66

Change by Anat Gafni - 03/Feb/09 05:24 PM
Order 3 6

Change by Carl Rosenberger - 05/Feb/09 03:12 PM
Order 6 7

Change by Carl Rosenberger - 19/Feb/09 02:17 PM
Order 7 3