Skip to content

AvroRecord doesn't handle CamelCased models correctly #47

@karlhe

Description

@karlhe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions