Hi,
the solution to my initial issue is to create a class MyClass with two class side methods
MyClass class >> isVoyageRoot
^ true
MyClass class >> descriptionContainer
�� �� <voyageContainer>
�� �� ^ VOContainer new
�� �� �� �� collectionName: 'myCollection';
�� �� �� �� yourself
Also, to properly read the data one should add instance variables to depending on what is in the database. For example:
{ "_id" : ObjectId("5900a0175bc65a2b7973b48a"), "item" : "canvas", "qty" : 100, "tags" : [ "cotton" ] }
In this case MyClass should have instanceVariables: 'item qty tags' and accessors.
Plus, on the class side
mongoItem
<mongoDescription>
^ VOToOneDescription new
attributeName: 'item';
kind: String;
yourself
mongoQty
<mongoDescription>
^ VOToOneDescription new
attributeName: 'qty';
kind: Integer;
yourself
mongoTags
<mongoDescription>
^ VOToOneDescription new
attributeName: 'tags';
kind: OrderedCollection;
yourself
After that one can connect to database and get the information.
| repository |��
repository := VOMongoRepository database: 'databaseName'.
repository selectAll: MyClass
Big thanks to Sabine, Esteban and Holger!
Cheers,
Mark