Torque
  1. Torque
  2. TORQUE-149

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-beta1
    • Component/s: None
    • Labels:
      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.

        Activity

        Thomas Fox created issue -
        Thomas Fox made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Thomas Fischer [ tfischer ]
        Fix Version/s 3.3.1 [ 12315233 ]
        Resolution Fixed [ 1 ]
        Thomas Vandahl made changes -
        Fix Version/s 4.0 [ 12312102 ]
        Fix Version/s 3.3.1 [ 12315233 ]
        Thomas Fox made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development