Mongo with Voyage

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

Mongo with Voyage

Pharo Smalltalk Users mailing list
Hello.
I'am using pharo 4.0 with external mongo database (mongolab.com)
I have like 7 classes which are voyageRoot.
I want to know if I will initialize mongo in each class or in which
class I can implement it.
Thanks

Reply | Threaded
Open this post in threaded view
|

Re: Mongo with Voyage

NorbertHartl
I'm not sure what you mean with initialize. If you think about creating the collections in mongo then you have to do nothing. Collections are created automatically as soon as you access them the first time. 

Norbert


Am 17.11.2016 um 12:29 schrieb Asbath Sama biyalou via Pharo-users <[hidden email]>:


Von: Asbath Sama biyalou <[hidden email]>
Betreff: Mongo with Voyage
Datum: 17. November 2016 um 12:29:24 MEZ


Hello.
I'am using pharo 4.0 with external mongo database (mongolab.com)
I have like 7 classes which are voyageRoot.
I want to know if I will initialize mongo in each class or in which
class I can implement it.
Thanks




Reply | Threaded
Open this post in threaded view
|

Re: Mongo with Voyage

Pharo Smalltalk Users mailing list

Thanks. Just look my function look like this:

initializeMongo
| repository |
repository := VOMongoRepository
    host: 'example.com'
    port: 27017
    database: 'example_name'.
repository enableSingleton.

"Collections are created automatically as soon as you access them the first time."  That is true but to connect to the
database.

In which I have to implement that method : all the root classes or what.

On 17/11/2016 12:34, Norbert Hartl wrote:
I'm not sure what you mean with initialize. If you think about creating the collections in mongo then you have to do nothing. Collections are created automatically as soon as you access them the first time. 

Norbert


Am 17.11.2016 um 12:29 schrieb Asbath Sama biyalou via Pharo-users <[hidden email]>:


Von: Asbath Sama biyalou <[hidden email]>
Betreff: Mongo with Voyage
Datum: 17. November 2016 um 12:29:24 MEZ


Hello.
I'am using pharo 4.0 with external mongo database (mongolab.com)
I have like 7 classes which are voyageRoot.
I want to know if I will initialize mongo in each class or in which
class I can implement it.
Thanks





Reply | Threaded
Open this post in threaded view
|

Re: Mongo with Voyage

NorbertHartl
In reply to this post by NorbertHartl
Ahh, I see. Your initializeMongo is actually a configuration of the system. That configuration you do once in the image, hence the name #enableSingleton because it is accessible as singleton from everywhere. 

Norbert

Am 17.11.2016 um 12:44 schrieb Asbath Sama biyalou <[hidden email]>:

Thanks. Just look my function look like this:

initializeMongo
| repository |
repository := VOMongoRepository
    host: 'example.com'
    port: 27017
    database: 'example_name'.
repository enableSingleton.

"Collections are created automatically as soon as you access them the first time."  That is true but to connect to the
database.

In which I have to implement that method : all the root classes or what.

On 17/11/2016 12:34, Norbert Hartl wrote:
I'm not sure what you mean with initialize. If you think about creating the collections in mongo then you have to do nothing. Collections are created automatically as soon as you access them the first time. 

Norbert


Am 17.11.2016 um 12:29 schrieb Asbath Sama biyalou via Pharo-users <[hidden email]>:


Von: Asbath Sama biyalou <[hidden email]>
Betreff: Mongo with Voyage
Datum: 17. November 2016 um 12:29:24 MEZ


Hello.
I'am using pharo 4.0 with external mongo database (mongolab.com)
I have like 7 classes which are voyageRoot.
I want to know if I will initialize mongo in each class or in which
class I can implement it.
Thanks






Reply | Threaded
Open this post in threaded view
|

Re: Mongo with Voyage

Pharo Smalltalk Users mailing list

Please Not very clear. Then I just execute that method in the playground and It is good.


On 17/11/2016 12:55, Norbert Hartl wrote:
Ahh, I see. Your initializeMongo is actually a configuration of the system. That configuration you do once in the image, hence the name #enableSingleton because it is accessible as singleton from everywhere. 

Norbert

Am 17.11.2016 um 12:44 schrieb Asbath Sama biyalou <[hidden email]>:

Thanks. Just look my function look like this:

initializeMongo
| repository |
repository := VOMongoRepository
    host: 'example.com'
    port: 27017
    database: 'example_name'.
repository enableSingleton.

"Collections are created automatically as soon as you access them the first time."  That is true but to connect to the
database.

In which I have to implement that method : all the root classes or what.

On 17/11/2016 12:34, Norbert Hartl wrote:
I'm not sure what you mean with initialize. If you think about creating the collections in mongo then you have to do nothing. Collections are created automatically as soon as you access them the first time. 

Norbert


Am 17.11.2016 um 12:29 schrieb Asbath Sama biyalou via Pharo-users <[hidden email]>:


Von: Asbath Sama biyalou <[hidden email]>
Betreff: Mongo with Voyage
Datum: 17. November 2016 um 12:29:24 MEZ


Hello.
I'am using pharo 4.0 with external mongo database (mongolab.com)
I have like 7 classes which are voyageRoot.
I want to know if I will initialize mongo in each class or in which
class I can implement it.
Thanks







Reply | Threaded
Open this post in threaded view
|

Re: Mongo with Voyage

NorbertHartl
In reply to this post by NorbertHartl


Am 17.11.2016 um 13:12 schrieb Asbath Sama biyalou <[hidden email]>:

Please Not very clear. Then I just execute that method in the playground and It is good.


yes

Norbert
On 17/11/2016 12:55, Norbert Hartl wrote:
Ahh, I see. Your initializeMongo is actually a configuration of the system. That configuration you do once in the image, hence the name #enableSingleton because it is accessible as singleton from everywhere. 

Norbert

Am 17.11.2016 um 12:44 schrieb Asbath Sama biyalou <[hidden email]>:

Thanks. Just look my function look like this:

initializeMongo
| repository |
repository := VOMongoRepository
    host: 'example.com'
    port: 27017
    database: 'example_name'.
repository enableSingleton.

"Collections are created automatically as soon as you access them the first time."  That is true but to connect to the
database.

In which I have to implement that method : all the root classes or what.

On 17/11/2016 12:34, Norbert Hartl wrote:
I'm not sure what you mean with initialize. If you think about creating the collections in mongo then you have to do nothing. Collections are created automatically as soon as you access them the first time. 

Norbert


Am 17.11.2016 um 12:29 schrieb Asbath Sama biyalou via Pharo-users <[hidden email]>:


Von: Asbath Sama biyalou <[hidden email]>
Betreff: Mongo with Voyage
Datum: 17. November 2016 um 12:29:24 MEZ


Hello.
I'am using pharo 4.0 with external mongo database (mongolab.com)
I have like 7 classes which are voyageRoot.
I want to know if I will initialize mongo in each class or in which
class I can implement it.
Thanks







Reply | Threaded
Open this post in threaded view
|

Re: Mongo with Voyage

Pharo Smalltalk Users mailing list

Thanks.


On 17/11/2016 13:25, Norbert Hartl wrote:


Am 17.11.2016 um 13:12 schrieb Asbath Sama biyalou <[hidden email]>:

Please Not very clear. Then I just execute that method in the playground and It is good.


yes

Norbert
On 17/11/2016 12:55, Norbert Hartl wrote:
Ahh, I see. Your initializeMongo is actually a configuration of the system. That configuration you do once in the image, hence the name #enableSingleton because it is accessible as singleton from everywhere. 

Norbert

Am 17.11.2016 um 12:44 schrieb Asbath Sama biyalou <[hidden email]>:

Thanks. Just look my function look like this:

initializeMongo
| repository |
repository := VOMongoRepository
    host: 'example.com'
    port: 27017
    database: 'example_name'.
repository enableSingleton.

"Collections are created automatically as soon as you access them the first time."  That is true but to connect to the
database.

In which I have to implement that method : all the root classes or what.

On 17/11/2016 12:34, Norbert Hartl wrote:
I'm not sure what you mean with initialize. If you think about creating the collections in mongo then you have to do nothing. Collections are created automatically as soon as you access them the first time. 

Norbert


Am 17.11.2016 um 12:29 schrieb Asbath Sama biyalou via Pharo-users <[hidden email]>:


Von: Asbath Sama biyalou <[hidden email]>
Betreff: Mongo with Voyage
Datum: 17. November 2016 um 12:29:24 MEZ


Hello.
I'am using pharo 4.0 with external mongo database (mongolab.com)
I have like 7 classes which are voyageRoot.
I want to know if I will initialize mongo in each class or in which
class I can implement it.
Thanks








Reply | Threaded
Open this post in threaded view
|

Re: Mongo with Voyage

Pharo Smalltalk Users mailing list
In reply to this post by NorbertHartl

Please When I execute initializeMongo I have a ConnectionTimedOut error. Is it my Internet connection or something else. Thanks


On 17/11/2016 13:25, Norbert Hartl wrote:


Am 17.11.2016 um 13:12 schrieb Asbath Sama biyalou <[hidden email]>:

Please Not very clear. Then I just execute that method in the playground and It is good.


yes

Norbert
On 17/11/2016 12:55, Norbert Hartl wrote:
Ahh, I see. Your initializeMongo is actually a configuration of the system. That configuration you do once in the image, hence the name #enableSingleton because it is accessible as singleton from everywhere. 

Norbert

Am 17.11.2016 um 12:44 schrieb Asbath Sama biyalou <[hidden email]>:

Thanks. Just look my function look like this:

initializeMongo
| repository |
repository := VOMongoRepository
    host: 'example.com'
    port: 27017
    database: 'example_name'.
repository enableSingleton.

"Collections are created automatically as soon as you access them the first time."  That is true but to connect to the
database.

In which I have to implement that method : all the root classes or what.

On 17/11/2016 12:34, Norbert Hartl wrote:
I'm not sure what you mean with initialize. If you think about creating the collections in mongo then you have to do nothing. Collections are created automatically as soon as you access them the first time. 

Norbert


Am 17.11.2016 um 12:29 schrieb Asbath Sama biyalou via Pharo-users <[hidden email]>:


Von: Asbath Sama biyalou <[hidden email]>
Betreff: Mongo with Voyage
Datum: 17. November 2016 um 12:29:24 MEZ


Hello.
I'am using pharo 4.0 with external mongo database (mongolab.com)
I have like 7 classes which are voyageRoot.
I want to know if I will initialize mongo in each class or in which
class I can implement it.
Thanks








Reply | Threaded
Open this post in threaded view
|

Re: Mongo with Voyage

stepharo
Did you check that your mongodb is running?



Le 17/11/16 à 14:23, Asbath Sama biyalou via Pharo-users a écrit :


Reply | Threaded
Open this post in threaded view
|

Re: Mongo with Voyage

NorbertHartl
That would be something like "cannot connect to..." aka connection refused



> Am 17.11.2016 um 20:57 schrieb stepharo <[hidden email]>:
>
> Did you check that your mongodb is running?
>
>
>
> Le 17/11/16 à 14:23, Asbath Sama biyalou via Pharo-users a écrit :
>
>