title: What is the preferred way to load a model object for a "show" action?
body: <p>I have an action that loads a model object and then renders that model object for editing</p>
  
  <pre><code>public static void show(Long id){
      if(id != null) {
  
          Company company = Company.findById(id);
          if (company != null){
              render(company);
          }
      }
      render();
  }
  </code></pre>
  
  <p>It seems like it might be a nice convenience to take advantage of the direct JPA object binding as referenced at <a href="http://www.playframework.org/documentation/1.2.4/controllers" rel="nofollow">http://www.playframework.org/documentation/1.2.4/controllers</a> that the framework provides to reduce some of this boilerplate lookup code.</p>
  
  <p>this would result in a method that looks like </p>
  
  <pre><code>public static void show(Company company){
      if(company.id != null){
          render(company);
      }
      render();
  }
  </code></pre>
  
  <p>you would need to pass a parameter named <code>company.id</code> for the lookup to work properly.  On the one hand this 2nd option does lead to a little bit less code, but it seems like there may be some overhead involved with going through the data binding process.  Are there any other concerns with the 2nd option here or any reason why you just absolutely should not do it this way?</p>