iBatis for Java [READ ONLY]
  1. iBatis for Java [READ ONLY]
  2. IBATIS-702

Fragments from other namespaces cannot be included

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0 Beta 5
    • Fix Version/s: 3.0 Beta 6
    • Component/s: None
    • Labels:
      None

      Description

      We have 2 mappers with their respecitive XML configuration.

      If we define a fragment named "fragment" in mapper A it is not usable as "A.fragment" in mapper b.

      This behaviour was different in iBatis 2 where it was possible to include fragments from other namespaces with their fully qualified name (by setting useNamespaces=true).

      I got this to work by "hacking" MapperAnnotationBuilder to include this:

      private static HashMap<String, XNode> fragments = new HashMap<String, XNode>();

      and then passing that map instead of an empty HashMap to new XMLMapperBuilder().

      I know that my solution is only a workaround but I didn't have the time to find the correct way (assistant, configuration, etc.).

        Activity

          People

          • Assignee:
            Clinton Begin
            Reporter:
            Dominik Mähl
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development