Torque
  1. Torque
  2. TORQUE-161

Create filler methods for related objects

    Details

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

      Description

      Currently, foreing relations can be filled either by lazy loading or by doSelectJoin... methods.
      The former causes one db hit per object and the latter causes much unnecessary data to be transferred if more than thwo related tables are filled.
      Therefore, it should be possible to fill related objects by filler methods which take a Collection of objects and load the objects related by a foreign key.
      The fill should happen by generating new filler methods in the peer classes. In order not to bloat the public API, the generation of these methods can be switched on by a generation option. The default is that the filler methods are not created.
      For example, if the Book table has a foreign key on the author table, the methods Book.Peer.fillAuthors(List<Book>) and AuthorPeer.fillBooks(List<Author>) should be generated. They return the list of related objects, so cascaded filling is easy.

        Activity

        Thomas Fox created issue -
        Thomas Fox made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.0 [ 12312102 ]
        Resolution Fixed [ 1 ]
        Thomas Fox made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1d 4h 6m 1 Thomas Fox 25/Jun/11 19:38
        Resolved Resolved Closed Closed
        456d 12h 28m 1 Thomas Fox 24/Sep/12 08:06

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development