Hi Norbert,
Aha! I unterstand.
This is an interesting aspect. Fortunately I dont have this case at the
moment. I will keep this in mind for the future.
Regards

Am Mittwoch, 9. März 2016 schrieb NorbertHartl [via Smalltalk] :

> Sabine,
>
> maybe my description wasn't clear enough. If you start to use voyage like
> that you have the constraint that all objects returned from the collection
> need to be the same or a subclass of the one you are using to search.
> Meaning
>
> If you query
>
> One selectAll
>
> then all of the objects in the Numbers collection need to be the same
> class or a subclass of One. So this use case is at first only feasible if
> you want to find all instances of Numbers. Your basic query needs to be
>
> Numbers selectAll
>
> If you then want to deal only with instances of One you would need to add
> this to the query
>
> Numbers selectMany: {
> '#instanceOf' -> #One } asDictionary
>
> This is not a nice approach but for this use case it should give you the
> desire result.
>
> Norbert
>
> Am 09.03.2016 um 10:52 schrieb Sabine Manaa <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4883475&i=0>>:
>
> Norbert, thank you. Ok, the Numbers collection name is clear.
>
> If I use
>
> <mongoContainer>
> ^ VOMongoContainer new
> collectionName: 'Numbers';
> yourself
>
> the data is stored correctly in the Numbers collection in Mongo. Also the
> relationship is fine.
> Everything fine till here.
>
> But after
>
> VOMongoRepository current reset.
>
> I have problems with fetching the data from mongo
>
> If I define
>
> mongoContainer
> <mongoContainer>
> ^ VOMongoContainer new
> enableMissingContent;
> collectionName: 'Numbers';
> "kind: self;"
> yourself
>
> Then I get the error "Bad object requested (Three does not inherits from
> One)"
>
> If I define
>
> mongoContainer
> <mongoContainer>
> ^ VOMongoContainer new
> enableMissingContent;
> collectionName: 'Numbers';
> kind: self;
> yourself
>
> Then I get an Inspector with 3 instances of "One" (I refer to the
> workspace of the image from tommasso)
> It should be only one instance of One
> Clicking on the one instances, I get an emergency screen with
>  ***System error handling failed****
> VOMongoError: Lazy reference not found ...
>
> Tommasso, do you get the same results?
>
> I am curious about the solution.
>
>
> ***************This is the workspace of tommasso
> repository dropDatabase.
> repository := VOMongoRepository
> host: 'localhost'
> database: 'VoyageMongo-Link-Test-5'.
> repository enableSingleton.
>
> one := One new.
> two := Two new.
> three := Three new.
>
> one link: two.
> one link: three.
>
> one save.
> two save.
> three save.
>
> VOMongoRepository current reset.
>
> One   selectAll
>
> ------------------------------
> View this message in context: Re: Voyage, Magritte descriptions, and nil
> exceptions
> <http://forum.world.st/Voyage-Magritte-descriptions-and-nil-exceptions-tp4882726p4883467.html>
> Sent from the Pharo Smalltalk Users mailing list archive
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com
> <http://nabble.com>.
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://forum.world.st/Voyage-Magritte-descriptions-and-nil-exceptions-tp4882726p4883475.html
> To start a new topic under Pharo Smalltalk Users, email
> ml-node+s1294792n1310670...@n4.nabble.com
> <javascript:_e(%7B%7D,'cvml','ml-node%2bs1294792n1310670...@n4.nabble.com');>
> To unsubscribe from Pharo Smalltalk Users, click here
> <http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1310670&code=bWFuYWEuc2FiaW5lQGdtYWlsLmNvbXwxMzEwNjcwfC0xOTE3OTcxOTg5>
> .
> NAML
> <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://forum.world.st/Voyage-Magritte-descriptions-and-nil-exceptions-tp4882726p4883498.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply via email to