Skip to content
This repository has been archived by the owner on Sep 2, 2019. It is now read-only.

Add tests for numerically-based property types #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jof
Copy link
Contributor

@jof jof commented Feb 27, 2012

There are some DataMapper property types that fail to get saved and reconstituted consistently (DateTime, symbolic and textual Enums). So, I added a few tests to show this.

I feel like there are perhaps some properties whose primitive types are not strings already that just need to get cast or something.
Most of the primitives for the failing types are numeric in nature.

jof added 2 commits February 27, 2012 14:14
I was noticing that enums seem to fail to load back from Redis. I added
some tests to try out some of the base types in DataMapper and found
that a few things fail.

Perhaps these tests ought to live as a sharable part of dm-core and
included here.
@whoahbot
Copy link
Owner

whoahbot commented Mar 3, 2012

Hi jof!

Thanks for the patch. I did some preliminary work on getting enum types to work at one point for another issue, but I haven't come up with a solution that I really like.

Since enum isn't part of the base dm-core install, there needs to be some checking to see if that type is available. I did notice by watching redis monitor that enum keys are stored with a prefix as to which 'type' of enum key it is, so it should be possible to support those types.

@whoahbot whoahbot mentioned this pull request Aug 27, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants