Index: library/mongodb/example-nx-mongo.tcl =================================================================== diff -u -rfe68b259d9a15328a04a9dc64394dc5ffe5ba5a4 -rc85ca5808548fc506bfc39600bafb8b11ecfac43 --- library/mongodb/example-nx-mongo.tcl (.../example-nx-mongo.tcl) (revision fe68b259d9a15328a04a9dc64394dc5ffe5ba5a4) +++ library/mongodb/example-nx-mongo.tcl (.../example-nx-mongo.tcl) (revision c85ca5808548fc506bfc39600bafb8b11ecfac43) @@ -1,5 +1,7 @@ # -# This is an example how to use the nx mongo mapping. +# This is an example how to use the nx mongo mapping. We show here +# single class mapped to the mongo db with sing and multivalued +# scalars together with some querying options. # # Gustaf Neumann fecit, April 2011 # @@ -93,17 +95,3 @@ puts "\t$p:\t[$p name]" } - -nx::mongo::Class create Users { - :attribute name:required -} - -nx::mongo::Class create Post { - :attribute title:required - :attribute user_id -} - -set u [Users new -name Smith] -$u save -set p [Post new -title "Hello World" -user_id [$u _id]] -$p save \ No newline at end of file