The reason I started using couchdb4j because it fully supports json-lib, and
json-lib has some nice XML-JSON conversion tools, which I am using.

Luke

On Thu, May 27, 2010 at 09:05, Jarrod Roberson <[email protected]>wrote:

> I would recommend spending you effort on jcouchdb instead
>
> Jarrod Roberson
> 678-551-2852
>
> On May 27, 2010, at 6:07 AM, "Leucht, Axel" <[email protected]>
> wrote:
>
> > I'm currently evaluating couchdb as a database for one of our web
> > applications.
> >
> > This scenario requires couchdb to be used from java. Therefore I
> > downloaded couchdb-0.11.0 and couchdb4j-0.1.2.jar.
> >
> > I did install couchdb on my Windows-XP box and it runs fine:
> >    {"couchdb":"Welcome","version":"0.11.0"}
> > Then I inserted two simple documents and tried to "query" it with the
> > following java program:
> >
> > Session s = new Session("localhost", 5984);
> > Database db = s.getDatabase("mydb");
> > ViewResults result = db.getAllDocuments();
> > for (Document d : result.getResults()) {
> >    System.out.println("id:"+d.getId());     // Oops
> >    String id = (String) d.get("id");
> >    System.out.println("id:"+id);        // Here "id" is correct
> >
> >    Document full = db.getDocument(d.getId());
> >    System.out.println("Name:"+full.getString("name"));
> > }
> >
> > Problem is that the document Ids are not returned. But the program
> > reports the proper id when getting the field directly.
> >
> > What gives?
> >
> > /Axel
> >
> > /Axel
>

Reply via email to