I'm having issues extending resultMap and using subMap. Like sql includes, the order in which the referencing elements are defined make a difference, except that for 'extends' and <subMap...>, only if the resultMaps are in different files/namespaces. When resultMap B extends resultMap A (when defined in separate files/namespaces), SqlMap A must be referenced first in SqlMapConfig.xml.
When resultMap A uses resultMap B as a subMap (within the discriminator element), SqlMap B must be referenced first in SqlMapConfig.xml. In both cases, the referenced resultMap must be processed first, but if the resultMaps are in the same file/namespace, the order is unimportant. The workaround is of course to just move/copy the referenced resultMaps into the file/namespace which uses them, or redefine the order. It seems references are resolved when the SqlMap file/namespace is processed, and the definitions made available to the following SqlMap files. If that is the case, is it possible to read all files/namespaces up front, and process all together? ...Chad