Hello,
I have a problem (bug?) using the DataService.fill() method
on the results of an SQL Query, using
flex.data.assemblers.SQLAssembler
I have mimicked the SQL Assembler demonstration application
that comes as part of Samples with LifeCycle DS.
I have altered data-management-config.xml to match my Oracle
connection, the table, and also modified the SQL query.
In the View, an ArrayCollection is populated using the
DataService.fill() method as:
quote:
f.fill(collection, 'all');
where
quote:
<mx:ArrayCollection id="collection"/>
<mx:DataService id="f" destination="my-destination" />
The XML file is set up correctly, connects to the database
and the Flex logger shows that a SequencedMessage Object is
populated as an Array of about 100 items, as expected. You can also
see the individual array items being populated.
However, at the view the ArrayCollection grows in length to
100 but all of its items are null.
Debugging my simple application and stepping through, some
very strange behaviour occurs...
When the fill() method is called the Collection is populated
with the first 3 dataitems, that is [0] [1] and [2] however the
value of [0] is actually the value of [4].
In the next step, [0] is set to null and the value of [4] is
populated.
Then [1] is set to null and [5] is populated, etc
This whole process repeats itself until the Collection grows
to length 100 and all items get set to null!
The strange thing is that I am filling two Collections via
two separate DataServices (in fact they are connecting to two
different databases).
The first one populates the Collection properly, but the
second one behaves in this way!
Any help would be greatly appreciated!