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

If silentDbFetch is false, the add method for a related object has a throws clause

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0-beta1
    • None
    • None

    Description

      If the option torque.om.silentDbFetch is false (which is NOT the default value), then Torque generates from the schema

      <table name="book" description="Book table">
      ....
      <foreign-key foreignTable="author">
      <reference local="author_id" foreign="author_id"/>
      </foreign-key>
      </table>

      the following code in BaseAuthor:

      public void addBook(Book l) throws TorqueException

      { getBooks().add(l); l.setAuthor((Author) this); }

      The throws clause is unnecessary because no Torque exception is created in the associated code. Thus the throws clause should be removed.

      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: