you are right.

I tried to introduce a parent class "Numbers" as superclass of One, Two and
Three and defined the relation like this

mongoLink
 <mongoDescription>
^ VOMongoToOneDescription new
attributeName: 'link';
kind: Numbers;
yourself

But it did not work.

I get a system error...I don't have so much time but I keep thinking and I
am interested in your results.

My model is so, that I always have the same types in one relationship, so
it did not occur in my project.

2016-03-08 19:58 GMT+01:00 Sabine Manaa <manaa.sab...@gmail.com>:

> I don't think it is a bug, there is missing the description of the
> relationship between one and two:
> If I define the following method, it works.
>
> Thomasso, do you know this documentation?
>
>
> https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/ws/book-result/Voyage/Voyage.pdf
>
>
> One class>>mongoLink
>  <mongoDescription>
> ^ VOMongoToOneDescription new
> attributeName: 'link';
> kind: Two;
> yourself
>
> regards
> Sabine
>
> 2016-03-08 16:31 GMT+01:00 EstebanLM [via Smalltalk] <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4883306&i=0>>:
>
>> Hi Tommaso,
>>
>> that might be a bug… which version are you using?
>> if latest, can you fill a bug here:
>> https://github.com/estebanlm/voyage/issues (so I do not forget it)?
>>
>> thanks,
>> Esteban
>>
>> On 08 Mar 2016, at 16:25, Tommaso Dal Sasso <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=4883253&i=0>> wrote:
>>
>> Hi,
>>
>> thanks for your answer, I also tried with One>>mongoContainer, but sadly
>> that does not solve the issue.
>> I think it works in your case because you have the One object cached from
>> the previous query, but if you inspect the "link" field, it should be nil.
>>
>> If you reset the repository connection, it should give the exception
>> again.
>>
>> I'll keep trying :-)
>> Tommaso
>>
>>
>>
>> On 07/03/16 14:07, Sabine Manaa wrote:
>>
>> Hi Tommaso,
>>
>> you did not define a One>>mongoContainer. I defined it and then it seems
>> to work.
>>
>> Regards
>>
>> 2016-03-06 1:42 GMT+01:00 Tommaso DS [via Smalltalk] <<a
>> moz-do-not-send="true"
>> href="x-msg://133/user/SendEmail.jtp?type=node&amp;node=4882948&amp;i=0"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]>:
>>
>>> Hi,
>>>
>>> I am having troubles with Voyage and Mongo.
>>> I have some Classes that I save in Mongo, say "One", "Two", and "Three".
>>> All three classes and are voyage roots, so the objects from each class
>>> are stored in different collections.
>>> One objects has a reference to Two or Three objects.
>>>
>>> The problem arises when I use a Magritte description and define a Mongo
>>> container to optimize the storage: since each class is stored in its own
>>> collection, there is no point in storing the #instanceOf attribute as
>>> well.
>>>
>>> Two>>mongoContainer
>>>      <mongoContainer>
>>>
>>>      ^ VOMongoContainer new
>>>          kind: Two;
>>>          yourself
>>>
>>> If I add this method, when I try to load an object One, I get the
>>> exception: "KeyNotFound: key #nil not found in SystemDictionary".
>>> It looks like Voyage is not able to understand the type of the objects
>>> stored in the collection Two, when loaded from a reference.
>>>
>>> Am I missing something? Do I need to specify something more to make it
>>> work?
>>>
>>> I reproduced the scenario in an image that can be downloaded here:
>>> https://dl.dropboxusercontent.com/u/11506662/VoyageMongo-Link-Test.zip
>>>
>>> Do you have any idea? Should I report this on the issue tracker?
>>>
>>> Thanks!
>>> Tommaso
>>>
>>>
>>>
>>> ------------------------------
>>> 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-tp4882726.html
>>> To start a new topic under Pharo Smalltalk Users, email <a
>>> moz-do-not-send="true"
>>> href="x-msg://133/user/SendEmail.jtp?type=node&amp;node=4882948&amp;i=1"
>>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> To unsubscribe from Pharo Smalltalk Users, click here.
>>> 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: Re: Voyage, Magritte descriptions, and nil
>> exceptions
>> <http://forum.world.st/Voyage-Magritte-descriptions-and-nil-exceptions-tp4882726p4882948.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-tp4882726p4883253.html
>> To start a new topic under Pharo Smalltalk Users, email [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=4883306&i=1>
>> To unsubscribe from Pharo Smalltalk Users, click here.
>> 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: Re: Voyage, Magritte descriptions, and nil
> exceptions
> <http://forum.world.st/Voyage-Magritte-descriptions-and-nil-exceptions-tp4882726p4883306.html>
> Sent from the Pharo Smalltalk Users mailing list archive
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com.
>

Reply via email to