Mongo - find object by id

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Mongo - find object by id

Sabine Manaa
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). } asDictionary.
                         
do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine
Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

philippeback

I had that issue and fixed it in the OID class which gave a wrong id. IIRC...

Afk now but will look for it and send the fix.

Phil

Le 12 août 2015 09:44, "Sabine Manaa" <[hidden email]> a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.

do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

EstebanLM

On 12 Aug 2015, at 10:56, [hidden email] wrote:

I had that issue and fixed it in the OID class which gave a wrong id. IIRC...

Afk now but will look for it and send the fix.


you are a contributor in 


feel free to commit your changes there.

And check the issue tracker: 


thanks,
Esteban

Phil

Le 12 août 2015 09:44, "Sabine Manaa" <[hidden email]> a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.

do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

EstebanLM
and here the issue report: https://github.com/estebanlm/voyage/issues/6  :)


On 12 Aug 2015, at 11:17, Esteban Lorenzano <[hidden email]> wrote:


On 12 Aug 2015, at 10:56, [hidden email] wrote:

I had that issue and fixed it in the OID class which gave a wrong id. IIRC...

Afk now but will look for it and send the fix.


you are a contributor in 


feel free to commit your changes there.

And check the issue tracker: 


thanks,
Esteban

Phil

Le 12 août 2015 09:44, "Sabine Manaa" <[hidden email]> a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.

do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

philippeback

I have forked and diverged a bit too much I think...

Phil

Le 12 août 2015 11:19, "Esteban Lorenzano" <[hidden email]> a écrit :
and here the issue report: https://github.com/estebanlm/voyage/issues/6  :)


On 12 Aug 2015, at 11:17, Esteban Lorenzano <[hidden email]> wrote:


On 12 Aug 2015, at 10:56, [hidden email] wrote:

I had that issue and fixed it in the OID class which gave a wrong id. IIRC...

Afk now but will look for it and send the fix.


you are a contributor in 


feel free to commit your changes there.

And check the issue tracker: 


thanks,
Esteban

Phil

Le 12 août 2015 09:44, "Sabine Manaa" <[hidden email]> a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.

do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

Ben Coman
Eric Raymond posits "Sitting on the patch gains nothing. Indeed, it
incurs a future cost..." [1]

[1] http://www.catb.org/esr/writings/cathedral-bazaar/magic-cauldron/ar01s05.html

cheers -ben

On Wed, Aug 12, 2015 at 5:28 PM, [hidden email] <[hidden email]> wrote:

> I have forked and diverged a bit too much I think...
>
> Phil
>
> Le 12 août 2015 11:19, "Esteban Lorenzano" <[hidden email]> a écrit :
>>
>> and here the issue report: https://github.com/estebanlm/voyage/issues/6
>> :)
>>
>>
>> On 12 Aug 2015, at 11:17, Esteban Lorenzano <[hidden email]> wrote:
>>
>>
>> On 12 Aug 2015, at 10:56, [hidden email] wrote:
>>
>> I had that issue and fixed it in the OID class which gave a wrong id.
>> IIRC...
>>
>> Afk now but will look for it and send the fix.
>>
>>
>> you are a contributor in
>>
>> http://smalltalkhub.com/#!/~estebanlm/Voyage
>>
>> feel free to commit your changes there.
>>
>> And check the issue tracker:
>>
>> https://github.com/estebanlm/voyage/issues
>>
>> thanks,
>> Esteban
>>
>> Phil
>>
>> Le 12 août 2015 09:44, "Sabine Manaa" <[hidden email]> a écrit :
>>>
>>> Hi,
>>>
>>> on mongo console, this brings me a persons information from mongo db
>>> db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})
>>>
>>> I try to query the same person from pharo and I do not succeed.
>>>
>>> This makes my image hanging:
>>> RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}
>>>
>>> also other variations e.g.
>>> RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
>>> asDictionary.
>>>
>>> do not work
>>>
>>> Other queries like
>>> RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
>>> or
>>> RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.
>>>
>>> work fine.
>>>
>>> How can I query for an object with the object id?
>>>
>>> Regards
>>> Sabine
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
>>> Sent from the Pharo Smalltalk Developers mailing list archive at
>>> Nabble.com.
>>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

philippeback


Le 12 août 2015 14:50, "Ben Coman" <[hidden email]> a écrit :
>
> Eric Raymond posits "Sitting on the patch gains nothing. Indeed, it
> incurs a future cost..." [1]
>
> [1] http://www.catb.org/esr/writings/cathedral-bazaar/magic-cauldron/ar01s05.html

Yeah, I hear you.

Phil

>
> cheers -ben
>
> On Wed, Aug 12, 2015 at 5:28 PM, [hidden email] <[hidden email]> wrote:
> > I have forked and diverged a bit too much I think...
> >
> > Phil
> >
> > Le 12 août 2015 11:19, "Esteban Lorenzano" <[hidden email]> a écrit :
> >>
> >> and here the issue report: https://github.com/estebanlm/voyage/issues/6
> >> :)
> >>
> >>
> >> On 12 Aug 2015, at 11:17, Esteban Lorenzano <[hidden email]> wrote:
> >>
> >>
> >> On 12 Aug 2015, at 10:56, [hidden email] wrote:
> >>
> >> I had that issue and fixed it in the OID class which gave a wrong id.
> >> IIRC...
> >>
> >> Afk now but will look for it and send the fix.
> >>
> >>
> >> you are a contributor in
> >>
> >> http://smalltalkhub.com/#!/~estebanlm/Voyage
> >>
> >> feel free to commit your changes there.
> >>
> >> And check the issue tracker:
> >>
> >> https://github.com/estebanlm/voyage/issues
> >>
> >> thanks,
> >> Esteban
> >>
> >> Phil
> >>
> >> Le 12 août 2015 09:44, "Sabine Manaa" <[hidden email]> a écrit :
> >>>
> >>> Hi,
> >>>
> >>> on mongo console, this brings me a persons information from mongo db
> >>> db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})
> >>>
> >>> I try to query the same person from pharo and I do not succeed.
> >>>
> >>> This makes my image hanging:
> >>> RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}
> >>>
> >>> also other variations e.g.
> >>> RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
> >>> asDictionary.
> >>>
> >>> do not work
> >>>
> >>> Other queries like
> >>> RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
> >>> or
> >>> RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.
> >>>
> >>> work fine.
> >>>
> >>> How can I query for an object with the object id?
> >>>
> >>> Regards
> >>> Sabine
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>> http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
> >>> Sent from the Pharo Smalltalk Developers mailing list archive at
> >>> Nabble.com.
> >>>
> >>
> >>
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

stepharo
In reply to this post by Ben Coman

> Eric Raymond posits "Sitting on the patch gains nothing. Indeed, it
> incurs a future cost..." [1]
>
> [1] http://www.catb.org/esr/writings/cathedral-bazaar/magic-cauldron/ar01s05.html
>
> cheers -ben

You are great ben!!!


Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

stepharo
In reply to this post by Sabine Manaa
Sabina

you know what I would really love from you ....
this is that you reread the Voyage chapter and make a list of the
problems you faced and that are not described in the chapter.
You can write it in any bad ways and we can do a edit phase after,

Why do I ask that? Because I'm stupid in Mongo and I would love to have
a good doc.
And only the people facing the problems can spot them nicely.
I often write doc on things that I do not know but this is not working
well because I'm slow in that case and .... I could be much better
doing something else where I'm good at.

Stef

Le 12/8/15 09:40, Sabine Manaa a écrit :

> Hi,
>
> on mongo console, this brings me a persons information from mongo db
> db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})
>
> I try to query the same person from pharo and I do not succeed.
>
> This makes my image hanging:
> RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}
>
> also other variations e.g.
> RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
> asDictionary.
>
> do not work
>
> Other queries like
> RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
> or
> RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.
>
> work fine.
>
> How can I query for an object with the object id?
>
> Regards
> Sabine
>
>
>
> --
> View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

Sabine Manaa
Hi Stephane,

sure, I am happy to give something back to the community. I dont have so much time because of my baby but I will try my best. 

Where shall I put it in?

Regards 
Sabine


Am Mittwoch, 12. August 2015 schrieb stepharo :
Sabina

you know what I would really love from you ....
this is that you reread the Voyage chapter and make a list of the problems you faced and that are not described in the chapter.
You can write it in any bad ways and we can do a edit phase after,

Why do I ask that? Because I'm stupid in Mongo and I would love to have a good doc.
And only the people facing the problems can spot them nicely.
I often write doc on things that I do not know but this is not working well because I'm slow in that case and .... I could be much better
doing something else where I'm good at.

Stef

Le 12/8/15 09:40, Sabine Manaa a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.
                       
do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

stepharo

Hi Stephane,

sure, I am happy to give something back to the community. I dont have so much time because of my baby but I will try my best. 

Where shall I put it in?

You can do pull requests in the paper. This way they will be close to the original version.

Sabina

you know what I would really love from you ....
this is that you reread the Voyage chapter and make a list of the problems you faced and that are not described in the chapter.
You can write it in any bad ways and we can do a edit phase after,

Why do I ask that? Because I'm stupid in Mongo and I would love to have a good doc.
And only the people facing the problems can spot them nicely.
I often write doc on things that I do not know but this is not working well because I'm slow in that case and .... I could be much better
doing something else where I'm good at.

Stef

Le 12/8/15 09:40, Sabine Manaa a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.
                       
do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.





Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

Sabine Manaa
Ok, I will do this after we found a solution for this bug:
 I added a comment and will proceed when I have success.
Opinion  from Esteban would be very helpful there.


2015-08-13 16:17 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

sure, I am happy to give something back to the community. I dont have so much time because of my baby but I will try my best. 

Where shall I put it in?

You can do pull requests in the paper. This way they will be close to the original version.


Sabina

you know what I would really love from you ....
this is that you reread the Voyage chapter and make a list of the problems you faced and that are not described in the chapter.
You can write it in any bad ways and we can do a edit phase after,

Why do I ask that? Because I'm stupid in Mongo and I would love to have a good doc.
And only the people facing the problems can spot them nicely.
I often write doc on things that I do not know but this is not working well because I'm slow in that case and .... I could be much better
doing something else where I'm good at.

Stef

Le 12/8/15 09:40, Sabine Manaa a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.
                       
do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.






Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

Sabine Manaa
Hi,

the problem is solved. Thanks John. (see here: https://github.com/estebanlm/voyage/issues/6)

2 Points:
1)
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). } asDictionary.
is wrong. I have to call e.g.
RKAPerson selectMany: {('_id' -> (OID value: 16r55CDD2B6E9A87A520F000001)). } asDictionary.

2) For correct generating of OID, I use this commit
http://smalltalkhub.com/#!/~MongoTalkTeam/mongotalk/versions/Mongo-BSON-HenrikSperreJohansen.43

Esteban, what do you think about putting this version of Henrik commit into the ConfigurationOfMongoTalk?

Regards
Sabine
Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

Sabine Manaa
Ok, I see, the fix of Henrik is already in the ConfigurationOfMongoTalk but in the development version, not yet stable.
I loaded stable. 
Great. Sorry for not checking this before writing the mail.

2015-08-16 10:30 GMT+02:00 Sabine Manaa <[hidden email]>:
Hi,

the problem is solved. Thanks John. (see here:
https://github.com/estebanlm/voyage/issues/6)

2 Points:
1)
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.
is wrong. I have to call e.g.
RKAPerson selectMany: {('_id' -> (OID value: 16r55CDD2B6E9A87A520F000001)).
} asDictionary.

2) For correct generating of OID, I use this commit
http://smalltalkhub.com/#!/~MongoTalkTeam/mongotalk/versions/Mongo-BSON-HenrikSperreJohansen.43

Esteban, what do you think about putting this version of Henrik commit into
the ConfigurationOfMongoTalk?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231p4843195.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

Sabine Manaa
In reply to this post by stepharo
Hi Stephane,

I have collected my points to add to the book.

Can you give me an entry point how to do a pull request on the paper please?
Pillar? Editor? Script? Sounds complicated for the first time.

Regards
Sabine



2015-08-13 16:17 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

sure, I am happy to give something back to the community. I dont have so much time because of my baby but I will try my best. 

Where shall I put it in?

You can do pull requests in the paper. This way they will be close to the original version.


Sabina

you know what I would really love from you ....
this is that you reread the Voyage chapter and make a list of the problems you faced and that are not described in the chapter.
You can write it in any bad ways and we can do a edit phase after,

Why do I ask that? Because I'm stupid in Mongo and I would love to have a good doc.
And only the people facing the problems can spot them nicely.
I often write doc on things that I do not know but this is not working well because I'm slow in that case and .... I could be much better
doing something else where I'm good at.

Stef

Le 12/8/15 09:40, Sabine Manaa a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.
                       
do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.






Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

stepharo

Hi Stephane,

I have collected my points to add to the book.

Can you give me an entry point how to do a pull request on the paper please?
Pillar? Editor? Script? Sounds complicated for the first time.

If you can use pillar this is better, else we will do a pass and convert it to pillar
Since the chapter is for the book that should be out I'm not that editing it directly is a good.
Now what we can do is to work on on a separate file that Johan or Esteban can merge to the chapter once
it is finished.

What I was thinking about is to have a series of extras section
with for example some of the problems and solutions you encountered.

   
    How to handle loop within your domain?
   
    How to find an object by id?

...

The original file is here:

https://github.com/SquareBracketAssociates/EnterprisePharo/tree/master/Voyage   

I created a VoyageAdditionalText.pier that you can edit.

And this is easy
    - you can go to the page
    - fork the folder
    - edit in the web the file and send a pull request.

if this is not working, we will add you to the project and you can directly edit this file.

Regards
Sabine



2015-08-13 16:17 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

sure, I am happy to give something back to the community. I dont have so much time because of my baby but I will try my best. 

Where shall I put it in?

You can do pull requests in the paper. This way they will be close to the original version.


Sabina

you know what I would really love from you ....
this is that you reread the Voyage chapter and make a list of the problems you faced and that are not described in the chapter.
You can write it in any bad ways and we can do a edit phase after,

Why do I ask that? Because I'm stupid in Mongo and I would love to have a good doc.
And only the people facing the problems can spot them nicely.
I often write doc on things that I do not know but this is not working well because I'm slow in that case and .... I could be much better
doing something else where I'm good at.

Stef

Le 12/8/15 09:40, Sabine Manaa a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.
                       
do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.







Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

Sabine Manaa
Hi Steph,

thanks. I am editing my suggestions and tell you when finished.

Regards
Sabine

2015-08-16 19:29 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

I have collected my points to add to the book.

Can you give me an entry point how to do a pull request on the paper please?
Pillar? Editor? Script? Sounds complicated for the first time.

If you can use pillar this is better, else we will do a pass and convert it to pillar
Since the chapter is for the book that should be out I'm not that editing it directly is a good.
Now what we can do is to work on on a separate file that Johan or Esteban can merge to the chapter once
it is finished.

What I was thinking about is to have a series of extras section
with for example some of the problems and solutions you encountered.

   
    How to handle loop within your domain?
   
    How to find an object by id?

...

The original file is here:

https://github.com/SquareBracketAssociates/EnterprisePharo/tree/master/Voyage   

I created a VoyageAdditionalText.pier that you can edit.

And this is easy
    - you can go to the page
    - fork the folder
    - edit in the web the file and send a pull request.

if this is not working, we will add you to the project and you can directly edit this file.

Regards
Sabine



2015-08-13 16:17 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

sure, I am happy to give something back to the community. I dont have so much time because of my baby but I will try my best. 

Where shall I put it in?

You can do pull requests in the paper. This way they will be close to the original version.


Sabina

you know what I would really love from you ....
this is that you reread the Voyage chapter and make a list of the problems you faced and that are not described in the chapter.
You can write it in any bad ways and we can do a edit phase after,

Why do I ask that? Because I'm stupid in Mongo and I would love to have a good doc.
And only the people facing the problems can spot them nicely.
I often write doc on things that I do not know but this is not working well because I'm slow in that case and .... I could be much better
doing something else where I'm good at.

Stef

Le 12/8/15 09:40, Sabine Manaa a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.
                       
do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.








Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

Sabine Manaa
Hi Stephane,

ok, I have put all my suggestions in a pull request. Please feel free to change, delete .... it is only a suggestion. I am interested in feedback!

Regards
Sabine

2015-08-17 14:53 GMT+02:00 Sabine Manaa <[hidden email]>:
Hi Steph,

thanks. I am editing my suggestions and tell you when finished.

Regards
Sabine

2015-08-16 19:29 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

I have collected my points to add to the book.

Can you give me an entry point how to do a pull request on the paper please?
Pillar? Editor? Script? Sounds complicated for the first time.

If you can use pillar this is better, else we will do a pass and convert it to pillar
Since the chapter is for the book that should be out I'm not that editing it directly is a good.
Now what we can do is to work on on a separate file that Johan or Esteban can merge to the chapter once
it is finished.

What I was thinking about is to have a series of extras section
with for example some of the problems and solutions you encountered.

   
    How to handle loop within your domain?
   
    How to find an object by id?

...

The original file is here:

https://github.com/SquareBracketAssociates/EnterprisePharo/tree/master/Voyage   

I created a VoyageAdditionalText.pier that you can edit.

And this is easy
    - you can go to the page
    - fork the folder
    - edit in the web the file and send a pull request.

if this is not working, we will add you to the project and you can directly edit this file.

Regards
Sabine



2015-08-13 16:17 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

sure, I am happy to give something back to the community. I dont have so much time because of my baby but I will try my best. 

Where shall I put it in?

You can do pull requests in the paper. This way they will be close to the original version.


Sabina

you know what I would really love from you ....
this is that you reread the Voyage chapter and make a list of the problems you faced and that are not described in the chapter.
You can write it in any bad ways and we can do a edit phase after,

Why do I ask that? Because I'm stupid in Mongo and I would love to have a good doc.
And only the people facing the problems can spot them nicely.
I often write doc on things that I do not know but this is not working well because I'm slow in that case and .... I could be much better
doing something else where I'm good at.

Stef

Le 12/8/15 09:40, Sabine Manaa a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.
                       
do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.









Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

Sabine Manaa
Hi Stephane,

my changes have been integrated into the document by Johan and I checked as ok, so it is done.

Regards
Sabine

2015-08-18 12:49 GMT+02:00 Sabine Manaa <[hidden email]>:
Hi Stephane,

ok, I have put all my suggestions in a pull request. Please feel free to change, delete .... it is only a suggestion. I am interested in feedback!

Regards
Sabine

2015-08-17 14:53 GMT+02:00 Sabine Manaa <[hidden email]>:
Hi Steph,

thanks. I am editing my suggestions and tell you when finished.

Regards
Sabine

2015-08-16 19:29 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

I have collected my points to add to the book.

Can you give me an entry point how to do a pull request on the paper please?
Pillar? Editor? Script? Sounds complicated for the first time.

If you can use pillar this is better, else we will do a pass and convert it to pillar
Since the chapter is for the book that should be out I'm not that editing it directly is a good.
Now what we can do is to work on on a separate file that Johan or Esteban can merge to the chapter once
it is finished.

What I was thinking about is to have a series of extras section
with for example some of the problems and solutions you encountered.

   
    How to handle loop within your domain?
   
    How to find an object by id?

...

The original file is here:

https://github.com/SquareBracketAssociates/EnterprisePharo/tree/master/Voyage   

I created a VoyageAdditionalText.pier that you can edit.

And this is easy
    - you can go to the page
    - fork the folder
    - edit in the web the file and send a pull request.

if this is not working, we will add you to the project and you can directly edit this file.

Regards
Sabine



2015-08-13 16:17 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

sure, I am happy to give something back to the community. I dont have so much time because of my baby but I will try my best. 

Where shall I put it in?

You can do pull requests in the paper. This way they will be close to the original version.


Sabina

you know what I would really love from you ....
this is that you reread the Voyage chapter and make a list of the problems you faced and that are not described in the chapter.
You can write it in any bad ways and we can do a edit phase after,

Why do I ask that? Because I'm stupid in Mongo and I would love to have a good doc.
And only the people facing the problems can spot them nicely.
I often write doc on things that I do not know but this is not working well because I'm slow in that case and .... I could be much better
doing something else where I'm good at.

Stef

Le 12/8/15 09:40, Sabine Manaa a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.
                       
do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.










Reply | Threaded
Open this post in threaded view
|

Re: Mongo - find object by id

stepharo
This is great I will reread soon the mongo chapter.
I should start to code a real app (if only I could have the time).

stef

Le 7/9/15 09:00, Sabine Manaa a écrit :
Hi Stephane,

my changes have been integrated into the document by Johan and I checked as ok, so it is done.

Regards
Sabine

2015-08-18 12:49 GMT+02:00 Sabine Manaa <[hidden email]>:
Hi Stephane,

ok, I have put all my suggestions in a pull request. Please feel free to change, delete .... it is only a suggestion. I am interested in feedback!

Regards
Sabine

2015-08-17 14:53 GMT+02:00 Sabine Manaa <[hidden email]>:
Hi Steph,

thanks. I am editing my suggestions and tell you when finished.

Regards
Sabine

2015-08-16 19:29 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

I have collected my points to add to the book.

Can you give me an entry point how to do a pull request on the paper please?
Pillar? Editor? Script? Sounds complicated for the first time.

If you can use pillar this is better, else we will do a pass and convert it to pillar
Since the chapter is for the book that should be out I'm not that editing it directly is a good.
Now what we can do is to work on on a separate file that Johan or Esteban can merge to the chapter once
it is finished.

What I was thinking about is to have a series of extras section
with for example some of the problems and solutions you encountered.

   
    How to handle loop within your domain?
   
    How to find an object by id?

...

The original file is here:

https://github.com/SquareBracketAssociates/EnterprisePharo/tree/master/Voyage   

I created a VoyageAdditionalText.pier that you can edit.

And this is easy
    - you can go to the page
    - fork the folder
    - edit in the web the file and send a pull request.

if this is not working, we will add you to the project and you can directly edit this file.

Regards
Sabine



2015-08-13 16:17 GMT+02:00 stepharo <[hidden email]>:

Hi Stephane,

sure, I am happy to give something back to the community. I dont have so much time because of my baby but I will try my best. 

Where shall I put it in?

You can do pull requests in the paper. This way they will be close to the original version.


Sabina

you know what I would really love from you ....
this is that you reread the Voyage chapter and make a list of the problems you faced and that are not described in the chapter.
You can write it in any bad ways and we can do a edit phase after,

Why do I ask that? Because I'm stupid in Mongo and I would love to have a good doc.
And only the people facing the problems can spot them nicely.
I often write doc on things that I do not know but this is not working well because I'm slow in that case and .... I could be much better
doing something else where I'm good at.

Stef

Le 12/8/15 09:40, Sabine Manaa a écrit :
Hi,

on mongo console, this brings me a persons information from mongo db
db.Persons.find({"_id" : ObjectId("75b900000000000000000000")})

I try to query the same person from pharo and I do not succeed.

This makes my image hanging:
RKAPerson selectMany: {('_id' -> (OID value:'75b900000000000000000000'))}

also other variations e.g.
RKAPerson selectMany: {('_id' -> ('75b900000000000000000000')). }
asDictionary.
                       
do not work

Other queries like
RKAPerson selectMany:{('lastName' -> ('Maier')).} asDictionary.
or
RKAPerson selectMany:{('nextTripNumber' -> (57)).} asDictionary.

work fine.

How can I query for an object with the object id?

Regards
Sabine



--
View this message in context: http://forum.world.st/Mongo-find-object-by-id-tp4842231.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.