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

Key: COR-702
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Unassigned
Reporter: Norberto Goussies
Votes: 0
Watchers: 0
Operations

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

GenericReflector/Query problem.

Created: 27/Jun/07 05:37 PM   Updated: 22/Aug/07 07:45 PM
Component/s: None
Affects Version/s: None
Fix Version/s: Denmark - v6.3

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

File Attachments: 1. File om_test_simple.rar (22 kb)
2. File test.db (21 kb)


Resolution Date: 22/Aug/07 07:45 PM
First Response Date: 11/Jul/07 05:52 PM
Labels:
Participants: Norberto Goussies and Patrick Roemer
Number of Attachments: 2
Number of Comments: 2


 Description  « Hide
When executing this code:
<!--
ObjectContainer container = Db4o.openFile("C:/db4o/eclipse/osgi_build/om_test_simple/test.db");
Query query = container.query();
ReflectClass clazz = container.ext()
.reflector()
.forName("com.dbo.om.test.simple.model.Adult");

query.constrain(clazz);
ObjectSet set = query.execute();
Object object = set.next();
-->

The object instance falis to recover the correct values.
The code to generate the test.db file and the test.db are attached.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Norberto Goussies - 27/Jun/07 05:40 PM
project to create the problematic db

Patrick Roemer - 11/Jul/07 05:52 PM
The cause for the behavior was double/redundant handling of the array property of a field: In the _array flag of the GenericField as well as with the GenericClass based type information of the field. As a result, db4o would try to handle the field type as an array of GenericArray instead of an array of the expected component type. Fixed by completely removing the _array flag from GenericField and adding special handling for GenericArray in GenericReflector#forObject().