Voyage: save Date, get back DateAndTime - bug?

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

Voyage: save Date, get back DateAndTime - bug?

Sabine Manaa
Hi Esteban, All,

when saving an instance of *Date* within an attribute with voyage into Mongo and doing

VOMongoRepository allInstancesDo: #reset.

then loading the object back from database, I get an inst of *DateAndTime* in this attribute.

Of course, I can "hack" by the tools you gave me :-) it but I ask myself if this is a bug or by intent.

Regards
Sabine

Reply | Threaded
Open this post in threaded view
|

Re: Voyage: save Date, get back DateAndTime - bug?

EstebanLM
Hi Sabine,

that's a known issue... from mongodb :)

Mongo does not recognize between Date and DateAndTime, so even if you commit a Date, you will have back a DateAndTime.
Only way I know to deal with that is by transforming it manually :(

cheers,
Esteban

On Aug 14, 2013, at 11:44 AM, Sabine Knöfel <[hidden email]> wrote:

> Hi Esteban, All,
>
> when saving an instance of *Date* within an attribute with voyage into Mongo
> and doing
>
> VOMongoRepository allInstancesDo: #reset.
>
> then loading the object back from database, I get an inst of *DateAndTime*
> in this attribute.
>
> Of course, I can "hack" by the tools you gave me :-) it but I ask myself if
> this is a bug or by intent.
>
> Regards
> Sabine
>
>
>
>
>
> --
> View this message in context: http://forum.world.st/Voyage-save-Date-get-back-DateAndTime-bug-tp4703601.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Voyage: save Date, get back DateAndTime - bug?

Sabine Manaa
Hi Esteban,

thanks for the quick reply, I wil hack it back. ;-)

Sabine


On Wed, Aug 14, 2013 at 11:50 AM, EstebanLM [via Smalltalk] <[hidden email]> wrote:
Hi Sabine,

that's a known issue... from mongodb :)

Mongo does not recognize between Date and DateAndTime, so even if you commit a Date, you will have back a DateAndTime.
Only way I know to deal with that is by transforming it manually :(

cheers,
Esteban

On Aug 14, 2013, at 11:44 AM, Sabine Knöfel <[hidden email]> wrote:

> Hi Esteban, All,
>
> when saving an instance of *Date* within an attribute with voyage into Mongo
> and doing
>
> VOMongoRepository allInstancesDo: #reset.
>
> then loading the object back from database, I get an inst of *DateAndTime*
> in this attribute.
>
> Of course, I can "hack" by the tools you gave me :-) it but I ask myself if
> this is a bug or by intent.
>
> Regards
> Sabine
>
>
>
>
>
> --
> View this message in context: http://forum.world.st/Voyage-save-Date-get-back-DateAndTime-bug-tp4703601.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>





If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Voyage-save-Date-get-back-DateAndTime-bug-tp4703601p4703609.html
To unsubscribe from Voyage: save Date, get back DateAndTime - bug?, click here.
NAML