Torque
  1. Torque
  2. TORQUE-148

remove throws clause in setter for referenced object by a foreign key

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-beta1
    • Component/s: None
    • Labels:
      None

      Description

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

      Torque generates (complexObjectModel=true) in BaseBook:

      public void setAuthor(Author v) throws TorqueException
      {
      if (v == null)

      { setAuthorId(0); }

      else

      { setAuthorId(v.getAuthorId()); }

      aAuthor = v;
      }

      the TorqueException in the throws clause of the method is never thrown and should be removed.

        Activity

        Thomas Fox made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        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 created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development