Index: library/mongodb/example-nx-mongo.tcl =================================================================== diff -u -rc81b840c71a9f0de9d0a502e3e4ddfde57b81fdd -ra978b09df089800818fb317d67286d9082164f91 --- library/mongodb/example-nx-mongo.tcl (.../example-nx-mongo.tcl) (revision c81b840c71a9f0de9d0a502e3e4ddfde57b81fdd) +++ library/mongodb/example-nx-mongo.tcl (.../example-nx-mongo.tcl) (revision a978b09df089800818fb317d67286d9082164f91) @@ -79,10 +79,16 @@ puts "\t$p:\t[$p name]" } +# +# Define a special find method for "Person" named "oldies" +# Person public class method "find oldies" {} { return [:find all -cond {age > 30}] } +# +# Use the special find method +# puts "\nFind oldies:" foreach p [Person find oldies] { puts "\t$p:\t[$p name]"