Hi,

Holger, thank you, I will try your suggestion.
However, I use MongoDB 3.4, and I think that Voyage has support for only
versions under 3.0. Am I right?

Stef, collection in mongo is a container for documents. For example, here
three documents are inserted in collection "inventory":

db.inventory.insertMany([
   { item: "journal", qty: 25, tags: ["blank", "red"], size: { h: 14, w:
21, uom: "cm" } },
   { item: "mat", qty: 85, tags: ["gray"], size: { h: 27.9, w: 35.5, uom:
"cm" } },
   { item: "mousepad", qty: 25, tags: ["gel", "blue"], size: { h: 19, w:
22.85, uom: "cm" } }
])
https://docs.mongodb.com/manual/tutorial/insert-documents/

Mark

2017-04-30 10:37 GMT+02:00 Stephane Ducasse <stepharo.s...@gmail.com>:

> mark
>
> what is such collection?
>
> Stef
>
> On Fri, Apr 28, 2017 at 11:04 PM, Holger Freyther <hol...@freyther.de>
> wrote:
>
>>
>> > On 28. Apr 2017, at 14:27, Mark Rizun <mri...@gmail.com> wrote:
>> >
>> > Hi,
>>
>> Hi!
>>
>>
>> > Is it possible to retrieve data from Mongo collection if it was not
>> created
>> > via Voyage?
>> > Meaning that I do not have a class in Pharo that would correspond to
>> said
>> > collection (should I implement one?).
>>
>> Yes. But you probably need to customize a bit.
>>
>> 1.) Make sure you refer to the right collection...
>>
>> descriptionContainer
>>         <mongoContainer>
>>         ^VOMongoContainer new
>>                 collectionName: 'yourExistingCollectionName'
>>                 yourself
>>
>>
>> 2.) For materialization.. you should at least have
>>         _id (okay every entry does that)
>>         VOMongoSerializer fieldVersion (#version on my old Voyage)
>>         VOMongoSerializer fieldType (#instanceOf)
>>
>> and then things should work out. You can probably add #version and
>> #instanceOf to your existing objects?
>>
>>
>>
>> holger
>>
>
>

Reply via email to