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