Index: library/mongodb/example-nx-mongo.tcl =================================================================== diff -u -r9248d253eb37bcefbfa38a1d86df306f40922444 -ra5bf2874a6cb0338860062dce1846279c1704444 --- library/mongodb/example-nx-mongo.tcl (.../example-nx-mongo.tcl) (revision 9248d253eb37bcefbfa38a1d86df306f40922444) +++ library/mongodb/example-nx-mongo.tcl (.../example-nx-mongo.tcl) (revision a5bf2874a6cb0338860062dce1846279c1704444) @@ -40,6 +40,16 @@ Person insert -name Franz -projects {gtat annobackend abc} -age 29 # +# Quick check of the results: count all persons and count the persons +# named Gustaf +# +set count [Person count] +puts "We have $count Persons in the database" + +set count [Person count -cond {name = Gustaf}] +puts "We have $count Persons named Gustaf" + +# # Lookup a single Person, create an instance of the object ... # set p [Person find first -cond {name = Gustaf}]