Index: library/mongodb/example-nx-reference-many.tcl =================================================================== diff -u -ra77464d1f7a06117c621560ec519dc4d387ed5df -r42ba8471f7620b850b6296f753cbc3079fe5c6cd --- library/mongodb/example-nx-reference-many.tcl (.../example-nx-reference-many.tcl) (revision a77464d1f7a06117c621560ec519dc4d387ed5df) +++ library/mongodb/example-nx-reference-many.tcl (.../example-nx-reference-many.tcl) (revision 42ba8471f7620b850b6296f753cbc3079fe5c6cd) @@ -28,7 +28,7 @@ # Retrieve the entry from the database: set g [Group find first -cond {name = "grp1"}] -puts stderr "Members of group: [$g members]\n" +puts stderr "Members of group: [$g cget -members]\n" ###################################################################### # The second approach to implement references to other objects via an @@ -52,11 +52,11 @@ # Retrieve the entry from the database: set g [Group find first -cond {name = "grp2"}] set members [list] -foreach m [Member find all -cond [list _id in [$g members]]] { +foreach m [Member find all -cond [list _id in [$g cget -members]]] { lappend members $m } -puts stderr "Members of group [$g name]:" -foreach m $members {puts stderr "\t[$m name]"} +puts stderr "Members of group [$g cget -name]:" +foreach m $members {puts stderr "\t[$m cget -name]"} puts stderr "" ###################################################################### @@ -81,8 +81,8 @@ # Retrieve the entry from the database: set g [Group find first -cond {name = "grp3"}] -puts stderr "Members of group [$g name]:" -foreach m [$g members] {puts stderr "\t[$m name]"} +puts stderr "Members of group [$g cget -name]:" +foreach m [$g cget -members] {puts stderr "\t[$m cget -name]"} puts stderr "" @@ -112,8 +112,8 @@ # Retrieve the entry from the database: set g [Group find first -cond {name = "grp4"}] - puts stderr "Members of group [$g name]:" - foreach m [$g members] {puts stderr "\t[$m name]"} + puts stderr "Members of group [$g cget -name]:" + foreach m [$g cget -members] {puts stderr "\t[$m cget -name]"} puts stderr "" puts stderr "Content of collection groups:"