title: NotReadablePropertyException Bean property is not readable or has an invalid getter method
body: <p>Having error: <code>org.springframework.beans.NotReadablePropertyException: Invalid property 'organizations' of bean class [com.sprhib.model.Team]: Bean property 'organizations' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?</code></p>
  
  <p>There are tables: teams, organization. There is One-to-Many relationship. </p>
  
  <p><strong>Team model</strong></p>
  
  <pre><code>@Entity
  @Table(name="teams")
  public class Team {
  
      private Organization organization;
  
      @ManyToOne(fetch = FetchType.EAGER)
      @JoinColumn(name = "FK_Organization_id", nullable = false)
      public Organization getOrganization() {
          return organization;
      }
  
      public void setOrganization(Organization organization) {
          this.organization = organization;
      }
  }
  </code></pre>
  
  <p><strong>Organization</strong></p>
  
  <pre><code>@Entity
  @Table(name = "organization")
  public class Organization {
      private Set&lt;Team&gt; teams;
  
      @OneToMany(fetch = FetchType.EAGER, mappedBy = "organization")
      public Set&lt;Team&gt; getTeams() {
          return teams;
      }
  
      public void setTeams(Set&lt;Team&gt; teams) {
          this.teams = teams;
      }
  }
  </code></pre>
  
  <p><strong>JSP</strong></p>
  
  <pre><code>&lt;form:form method="POST" commandName="team" action="${pageContext.request.contextPath}/team/add.html"&gt;    
       &lt;form:select path="organizations"&gt;
           &lt;form:option value="${organization}"&gt;
               &lt;c:out value="${organization.name}"/&gt;
           &lt;/form:option&gt;
       &lt;/form:select&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p>How to make spring get all organizations to JSP?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I pass a list of <em>all organizations</em> and new Team object to jsp using controller:</p>
  
  <pre><code>@Controller
  @RequestMapping(value="/team")
  public class TeamController {
  
      @Autowired
      private TeamService teamService;
  
      @Autowired
      private OrganizationService organizationService;
  
      @RequestMapping(value="/add", method=RequestMethod.GET)
      public ModelAndView addTeamPage() {
          ModelAndView modelAndView = new ModelAndView("teams/add-team-form");
          modelAndView.addObject("team", new Team());
          modelAndView.addObject("organizations", organizationService.getOrganizations());
  
          return modelAndView;
      }
  </code></pre>
  
  <p>UPDATE2:</p>
  
  <p>Does <code>commandName="team"</code> restricts usage of more than 1 model attributes, in this case there are two: <code>organizations</code> and <code>team</code>? How to make it work?</p>
  
  <blockquote>
    <p>Custom attribute name: commandName Description: Name of the model
    attribute under which the form object is exposed. Defaults to
    'command'. Required: false Can have runtime value: true</p>
  </blockquote>