title: Spring Data Couchbase: method findBy object throws java.lang.IllegalArgumentException "Unsupported type for JsonArray"
body: <p>I created a spring boot project. Specified data model:</p>
  
  <pre><code>
  @Document
  public class User {
  
      @Id
      private String id;
  
      @Field
      private String firstname;
  
      @Field
      private List&lt;Child&gt; children;
  
      public User(String id, String firstname, List&lt;Child&gt; children) {
          this.id = id;
          this.firstname = firstname;
          this.children = children;
      }
  
      static class Child {
          private String name;
          private int age;
  
          Child(String name, int age) {
              this.name = name;
              this.age = age;
          }
  
      }
  
  }
  </code></pre>
  
  <p>Also, created Reactive Repository:</p>
  
  <pre><code>@N1qlPrimaryIndexed
  @ViewIndexed(designDoc = "UserView")
  public interface UserViewRepository extends ReactiveCouchbaseSortingRepository&lt; UserView, String&gt; {
   List&lt;User&gt; findByChildren(Child child);
   List&lt;User&gt; findByFirstname(String firstname);
  }
  </code></pre>
  
  <p>Calling the method <strong>findByChild</strong> has generated an exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Unsupported type for JsonArray: class ru.andyhunt.user.User.Child
      at com.couchbase.client.java.document.json.JsonArray.add(JsonArray.java:214) ~[java-client-2.7.11.jar:na]
      Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
  Error has been observed at the following site(s):
      |_ checkpoint ⇢ HTTP GET "/users" [ExceptionHandlingWebHandler]
  Stack trace:
          at com.couchbase.client.java.document.json.JsonArray.add(JsonArray.java:214) ~[java-client-2.7.11.jar:na]
          at org.springframework.data.couchbase.repository.query.support.N1qlQueryCreatorUtils.createExpression(N1qlQueryCreatorUtils.java:94) ~[spring-data-couchbase-3.2.3.RELEASE.jar:3.2.3.RELEASE]
          at org.springframework.data.couchbase.repository.query.support.N1qlQueryCreatorUtils.prepareExpression(N1qlQueryCreatorUtils.java:66) ~[spring-data-couchbase-3.2.3.RELEASE.jar:3.2.3.RELEASE]
          at org.springframework.data.couchbase.repository.query.N1qlQueryCreator.create(N1qlQueryCreator.java:109) ~[spring-data-couchbase-3.2.3.RELEASE.jar:3.2.3.RELEASE]
          at org.springframework.data.couchbase.repository.query.N1qlQueryCreator.create(N1qlQueryCreator.java:88) ~[spring-data-couchbase-3.2.3.RELEASE.jar:3.2.3.RELEASE]
          at org.springframework.data.repository.query.parser.AbstractQueryCreator.createCriteria(AbstractQueryCreator.java:119) ~[spring-data-commons-2.2.3.RELEASE.jar:2.2.3.RELEASE]
          at org.springframework.data.repository.query.parser.AbstractQueryCreator.createQuery(AbstractQueryCreator.java:95) ~[spring-data-commons-2.2.3.RELEASE.jar:2.2.3.RELEASE]
          at org.springframework.data.repository.query.parser.AbstractQueryCreator.createQuery(AbstractQueryCreator.java:81) ~[spring-data-commons-2.2.3.RELEASE.jar:2.2.3.RELEASE]
          at org.springframework.data.couchbase.repository.query.ReactivePartTreeN1qlBasedQuery.getStatement(ReactivePartTreeN1qlBasedQuery.java:72) ~[spring-data-couchbase-3.2.3.RELEASE.jar:3.2.3.RELEASE]
          at org.springframework.data.couchbase.repository.query.ReactiveAbstractN1qlBasedQuery.execute(ReactiveAbstractN1qlBasedQuery.java:62) ~[spring-data-couchbase-3.2.3.RELEASE.jar:3.2.3.RELEASE]
          at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:618) ~[spring-data-commons-2.2.3.RELEASE.jar:2.2.3.RELEASE]
          at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:605) ~[spring-data-commons-2.2.3.RELEASE.jar:2.2.3.RELEASE]
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.2.RELEASE.jar:5.2.2.RELEASE]
  </code></pre>
  
  <p>Versions: Spring boot 2.2.2.RELEASE
  spring-data-couchbase-3.2.3.RELEASE</p>
  
  <p>Why does Spring-Data extension not convert a <em>User</em> object to a <em>JsonObject</em>?
  But, method <strong>getByFirstname</strong> works correctly.</p>
  
  <p><em>Thank you!</em></p>