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

Don't cast keys to Integers. Enables textual keys. #27

Merged
merged 1 commit into from Feb 8, 2012

Conversation

jof
Copy link
Contributor

@jof jof commented Feb 7, 2012

This is a potential fix for Issue #25.

There are several places in the adapter where textual keys from redis are cast to integers. While conventional, this breaks retrieving or enumerating stored model instances where the key is non-numeric.

While this fixes this issue for me, the current master still fails some rspec tests that are included in from DataMapper.

@whoahbot
Copy link
Owner

whoahbot commented Feb 7, 2012

Hi jof,

Thanks so much for the patch! I'll have a look at this tonight and see if I can get the rest of the specs passing again.

@jof
Copy link
Contributor Author

jof commented Feb 7, 2012

You're welcome. Thanks so much for dm-redis-adapter!

I'm making a small Resque-like application and need to store a few things where I just need to check the validity of a few properties.
Shoeing in redis as a simple database-like cache made this really simple (instead of also installing a full-blown RDBMS).

@whoahbot
Copy link
Owner

whoahbot commented Feb 8, 2012

I think there is one more patch to make this work fully, but I'll merge in this pull request and then apply that.

whoahbot added a commit that referenced this pull request Feb 8, 2012
Don't cast keys to Integers. Enables textual keys.
@whoahbot whoahbot merged commit b95b740 into whoahbot:master Feb 8, 2012
@jof jof deleted the non-numeric_keys branch December 30, 2012 09:51
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.

None yet

2 participants