title: Pass Array of POJO items to a stored procedure using mybatis?
body: <p>I have the following java class : </p>
  
  <pre><code>public class item implements Serializable {    
  
      private long id;
      private String name;    
  
      public long getUuid() {
          return id;
      }    
  
      public void setId(long id) {
          this.id = id;
      }    
  
      public String getName() {
          return this.name;
      }    
  
      public void setName(String name) {
          this.name = name;
      }    
  }
  </code></pre>
  
  <p>Lets assume I have an array of these - and I have a stored procedure which can iterate over a collection - known as "@pItemsToProcess".</p>
  
  <p>What do I need to do to make my stored procedure take this array? </p>
  
  <p>So I need to write some sort of type handler? If so, would it be for the array? The "item" class? Both?</p>
  
  <p>I've seen other users ask similar questions to this - but there doesn't seem to be a working solution on any of the questions.</p>
  
  <p>I am also open to maybe having the DB team change the stored procedure to work with one item at a time, and calling the proc with each item if that would be easier? Because this proc would only get called once a day, with around 20 items, it is not latency sensitive, and we are not worried about load.</p>
  
  <p>EDITS BELOW THIS LINE! ----------</p>
  
  <p>Database type is an SQL server.</p>