Uploaded image for project: 'Torque'
  1. Torque
  2. TORQUE-21

OM generated code does not compile when bean generation is activated and a table has several references to an other table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2
    • 3.3
    • Generator
    • None
    • TRQS355

    Description

      There is a bug in Torque OM generation (Java code does not compile) which appears in the following conditions :
      torque.complexObjectModel=true, torque.objectIsCaching=true, torque.generateBeans=true and a table has several references to an other table.

      The problem can be reproduced with the test case I added in the test-schema.xml.patch file attached (XML definition of table 'multi_referencor' which references table 'referenced' through three columns). If one adds 'multi_rerencor' and 'referenced' table definitions in file test-schema.xml and then runs the Torque test project, test fails during compilation of "base" class generated for table 'referenced' in method :
      public static Referenced createReferenced(ReferencedBean bean, IdentityMap createdObjects).

      Here is a patch which corrects the defect in template ObjectBeanMethods.vm

      Attachments

        1. test-schema.xml.patch
          2 kB
          Nicolas Le Griel
        2. ObjectBeanMethods.vm.patch
          1 kB
          Nicolas Le Griel

        Activity

          People

            tfischer Thomas Fox
            nlegriel Nicolas Le Griel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: