title: No mapping metadata found for java.lang.Object - Couchbase
body: <p>I'm persisting an entity in a CouchBase repository and trying to query it. The entity looks like this:</p>
  
  <pre><code>@Document(expiry = 0)
  public class GsJsonStore implements Serializable {
      private static final long serialVersionUID = 7133072282172062535L;
      @Id @GeneratedValue(strategy=GenerationType.AUTO)
      private long id;
      @Field
      private Map&lt;String,Object&gt; _object;
      @Field
      private String _subject;
      @Field
      private String _predicate;
      //Getters and Setters 
      }
  </code></pre>
  
  <p>I'm querying the entity by using N1QL queries on the CouchbaseOperations template like this:</p>
  
  <pre><code>String query1 =  "SELECT META(default).id as _ID, META(default).cas as _CAS, default.* FROM default WHERE "+key+"="+"'"+value+"'";
  
  List&lt;GsJsonStore&gt; list = operations.findByN1QL(N1qlQuery.simple(query1), GsJsonStore.class);
  </code></pre>
  
  <p>I'm querying for a K-V pair within the _object Map. I get an error : <code>No mapping metadata found for java.lang.Object</code> </p>
  
  <p>Why is this happening? Also, I'm storing a json object as <code>Map&lt;String,Object&gt;</code> in Couchbase, I tried using the jackson <code>JsonNode</code> type but the object was also storing class related metadata. Is there a better datatype to represent the json type?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Data stored in Couchbase : </p>
  
  <pre><code>{
  "_object" : {
  "Name" : "Kapil",
  "Age" : {
  "Nested" : 21
  }
  },
  "_subject" : "Subject",
  "_predicate" : "Predicate"
  }
  </code></pre>
  
  <p>The key I'm looking for is _object.Name and value is 'Kapil'</p>