title: Deserialize json ids to list of objects
body: <p>I am sending ajax json request to my controller using jackson. This is my entity:</p>
  
  <pre><code>@Entity
  public class Template implements Serializable
  {
      private String templateName;
  
      @ManyToMany(cascade = CascadeType.MERGE, fetch = FetchType.EAGER)
      private List&lt;Action&gt; actions;
  
      //getters setters
  }
  </code></pre>
  
  <p>My JSON looks like:</p>
  
  <pre><code>"{"templateName":"aaa",
   "actions":["2", "3"]
  }"
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code> @RequestMapping(value = "/testCreate", consumes = MediaType.APPLICATION_JSON_VALUE)
      public @ResponseBody List&lt;ObjectError&gt; testCreate(@Valid @RequestBody final TemplateForm templateForm,
              final BindingResult bindingResult)
      {
          if (bindingResult.hasErrors())
          {
              return bindingResult.getAllErrors();
          }
          else
          {
              //some actions
              return EMPTY_LIST;
          }
      }
  </code></pre>
  
  <p>How to map action ids from JSON on list of Action object? Thank you.</p>