Torque
  1. Torque
  2. TORQUE-183

allow for large schemas to be broken up into sub-schema files

    Details

    • Type: Wish Wish
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 4.0-beta1
    • Component/s: Generator
    • Labels:
      None

      Description

      In an attempt to break up a large schema file into smaller sub-schema files using the external schema feature, I recently ran into a design feature with the torque generator and the implementation of the complexDataModel flag.

      To illustrate, I have created a github project at https://github.com/helgew/Torque-Schema-Test. As you will see, there are two schema files: first-schema.xml (defines tbl1) and second-schema.xml (defines tbl2 and tbl3) which includes the first. The second file defines a link table between tbl2 and tbl1 as well as tbl3 respectively. The generated base classes for tbl1 and tbl3 differ in that BaseTbl3 has the getter methods for the link table, whereas BaseTbl1 does not.

      As was pointed out to me on the mailing list, this behavior is intended. However, I think it would be a very useful feature to be able to split a large schema into several sub-schema files and not lose the ability to generate these setters!

        Activity

        Hide
        Thomas Fox added a comment -

        You can now use an <include-schema file="..." /> element to include other files as if they were part of the original schema.
        Take care to exclude the included files from generation, otherwise Torque may complain about not being able to resolve foreign key relations.

        Show
        Thomas Fox added a comment - You can now use an <include-schema file="..." /> element to include other files as if they were part of the original schema. Take care to exclude the included files from generation, otherwise Torque may complain about not being able to resolve foreign key relations.

          People

          • Assignee:
            Thomas Fox
            Reporter:
            Helge Weissig
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development