Sunday, September 26, 2010

Collection result contains a duplicate item

Got this error today using Flash Builder 4, Coldfusion 9 and a CallResponder.

Fix:

As the error reads, the ArrayCollection that was returned by the ColdFusion server contained two items with the same index. I first tried to see if I could process it within FB4 and remove the extra item. However, the solution was in looking at the source and finding out that a SQL JOIN I made was delivering duplicates because two tables were joined on only one variable. I added the second variable and the problem was fixed. End of story.

Hope it helps.