> On 3 Mar 2017, at 12:17, Hilaire <hila...@drgeo.eu> wrote:
> 
> Hi Esteban,
> 
> I could, but I don't understand why the attribute does not resolve to an
> object equals to the other one in memory.

if you have objects in memory you can do 

MyRoot selectAll select: [ :each | whateverYouWantBecauseYouAreInPharo ].

but if you do 

MyRoor selectMany: [ :each | … here you need to apply a mongo query, you will 
not have the objects until query is executed and result is retrieved ]

Esteban

> 
> If I add an inspect to the attributes, it resolves correctly and code
> work as expected:
> 
> myObjectInRepo select: [ :each |
>  each anAttribute inspect.
>  someObjects includes: each anAttribute "the one Voyage should fetch"]
> 
> There is some lazyness in resolving the object.
> 
> I implemented = to bypass the == and primivite but it does not help.
> 
> For efficiency and special aspect of the model, I prefer to stick to the
> Smalltalk iterators when possible.
> 
> Hilaire
> 
> 
> 
> Le 03/03/2017 à 12:02, Esteban Lorenzano a écrit :
>> why?
>> you cannot transform that into a mongo query?
>> 
>> something like: 
>> 
>> myObjectInRepo select: [ :each | (each at: ‘attribute’) in: 
>> someObjectsCollection ]
>> 
>> Esteban
> 
> -- 
> Dr. Geo
> http://drgeo.eu
> 
> 


Reply via email to