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

Create filler methods for related objects

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0-beta1
    • None
    • 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.

      Attachments

        Activity

          People

            tfischer Thomas Fox
            tfischer Thomas Fox
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: