Skip to content
This repository was archived by the owner on Apr 18, 2018. It is now read-only.
This repository was archived by the owner on Apr 18, 2018. It is now read-only.

Mongo data_store doesn't handle timestamps properly #19

@mrerrormessage

Description

@mrerrormessage

In using the mongo data store, I've found the issue with timestamps. The mongo driver returns ruby time objects instead of strings, which causes issues in repository._deserialize. I'm not sure what the preferred solution would be here. I can see a few possibilities:

  • Have repository check if the time passed back attributes[:create_at].is_a? Time (this is special-casing the repository for a driver)
  • Have data_stores handle time serialization/deserialization (this seems rather workable, but would take longer and move more code out of repository)
  • Have the mongo data_store put its timestamps in string format (hacky)

I'd be happy to put in work on whichever of these approaches seems best for the project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions