Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AvroRecord doesn't handle CamelCased models correctly #47

Open
karlhe opened this issue Feb 6, 2011 · 0 comments
Open

AvroRecord doesn't handle CamelCased models correctly #47

karlhe opened this issue Feb 6, 2011 · 0 comments
Labels

Comments

@karlhe
Copy link
Contributor

karlhe commented Feb 6, 2011

Namely, this line is suspect:

$CLIENT.send(self.class.to_s.downcase.pluralize).put(avro_pair.key, avro_pair.value)

As in, the following unexpected behavior will happen:

# For class HashTag
$CLIENT.hash_tags # => error
$CLIENT.hashtags  # => success

Easily fixed by doing the following:

$CLIENT.send(self.class.to_s.underscore.downcase.pluralize).put(avro_pair.key, avro_pair.value)

However, as Gradit is already working around this in GraditClient.scala, changing it at this point would break Gradit so I'll leave it as an open isue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant