... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2006-02-24

BEA ALDSP

Today Wing found a problem when trying to write back document changes using BEA ALDSP.  The error message stated that the heritage of the changes was ambiguous.  Viewing the query plan for the relevant data source, we found a warning stating that the type of the result did not match the type of the document.  Further investigation revealed that if we changed the return type of the data source function from 'Activity' to 'Activity*', then everything worked -- except that now the document was wrapped in one of BEA's famous generated 'array' types.  It turns out that the expression that was computing the return result implied a maxOccurs of "unbounded", e.g.  for $activity in ns0:getActivity().  We knew, however, that this function always returned no more than one result.  Thus, the problem was solved by changing the expression to let $activity := ns0:getActivity()[1].  Interesting that the compiler was correctly identifying that the expression actually returned Activity* but didn't complain when the function was declared as returning Activity.

Blog Archive