title: Thymeleaf - Accessing nested object (new)
body: <p>I'm new to thymeleaf, and have a little problem causing headache.</p>
  
  <p>I have an entity "Payment", and Payment has "Manager" entity as attribute.</p>
  
  <pre><code>@ManyToOne
  @JoinColumn(name = "manager")
  private Manager manager;
  </code></pre>
  
  <p>And Manager Entity has attributes like id, name, .. so on.
  I want to access to the 'name' attribute from Payment Dto, like below.</p>
  
  <pre><code>&lt;td&gt;&lt;span th:text="${payment.manager.id}"&gt;&lt;/span&gt;&lt;/td&gt;
  </code></pre>
  
  <p>However, it generates error code.</p>
  
  <pre><code>org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'name' cannot be found on null
  </code></pre>
  
  <p>I tried <code>&lt;td&gt;&lt;span th:text="${payment.manager}"&gt;&lt;/span&gt;&lt;/td&gt;</code> this, and the program was running without error, although nothing was shown in that line.</p>
  
  <p>How can I access to inner attribute(ex. name) of a nested objects like</p>
  
  <p>Payment { Manager { id, <strong>name</strong>, ... } }</p>
  
  <p>this?</p>