helun / Ektorp

Java API for CouchDB
Apache License 2.0
299 stars 146 forks source link

DbInfo cannot get deserialized correctly #290

Open triplem opened 5 years ago

triplem commented 5 years ago

In my couchDB the field DbInfo.purge_seq is a String and not an int.

{"db_name":"ngs","purge_seq":"0-g1AAAAEzeJzLYWBg4MhgTmHgzcvPy09JdcjLz8gvLskBCjPlsQBJhgdA6j8QZCUy4FCXlAAkk-rxqoGYdQBi1n1C6hZA1O0npK4Bom4-Hrc5gNwWj9_9CiA19njVJDIkyUMUZAEAK_Ni9g","update_seq":"14-g1AAAAEzeJzLYWBg4MhgTmHgzcvPy09JdcjLz8gvLskBCjMlMiTJ____PyuREYeCJAUgmWQPVsOES40DSE08fnMSQGrq8arJYwGSDA1ACqhsflYiC151CyDq9hMy7wBE3X1C5j2AqAO6jyELAI--YwQ","sizes":{"file":112062,"external":403979,"active":30913},"other":{"data_size":403979},"doc_del_count":0,"doc_count":14,"disk_size":112062,"disk_format_version":7,"data_size":30913,"compact_running":false,"cluster":{"q":8,"n":1,"w":1,"r":1},"instance_start_time":"0"}

Therefor this Object cannot get de-serialized correctly. My CouchDB is version 2.3.0.

chengc843988 commented 5 years ago

I don't know wht was is this side-effect, if I change purge_seq to String So, I change the purge_seq to String, and getPrugeSeq API. THEN put this class into your classpath for replacing the default class in *jar.

package org.ektorp;

import java.io.; import java.util.;

import com.fasterxml.jackson.annotation.; import org.ektorp.util.; import com.fasterxml.jackson.databind.JsonNode;

/*

}

thigg commented 5 years ago

+1 According to https://docs.couchdb.org/en/stable/api/database/common.html purge_seq should be a string

jimfcarroll commented 4 years ago

How is this still open? Is this project dead?

malmyros commented 2 years ago

Is this still maintained? It looks like this needs fixing as others have mentioned above. Can we help get this moving forward?