Added a check for the fields primary storage column as it's not always 'value'

The findBy method assumed a field 'value' for storage. This change gets the primary column for the field and checks that instead.
I don't think that works for fields which is what this is about.

Sent from my iPhone

> On 15 Jul 2014, at 20:51, Stewart Robinson <notifications@github.com> wrote:
> 
> In entity_decorator_finder.class.inc:
> 
> >      if (count($value)) {
> >        // Is the field a property?
> >        if ($this->isProperty($field_name)) {
> >          $this->query->propertyCondition($field_name, $value, $operator);
> >        }
> > +      else if (isset($field_info['columns'])) {
> > +        $this->query->fieldCondition($field_name, current(array_keys($field_info['columns'])), $value, $operator);
> You could call https://api.drupal.org/api/drupal/includes%21common.inc/function/entity_get_info/7 to get the entity_info for this entity type. In the return structure you should receive a key called "entity keys" which would have a key in it called ID which is the name of the element on the entity for the Primary key. As I've written this I've realised that might not change whether it is value or whatever but I've written nearly four lines!
> 
> —
> Reply to this email directly or view it on GitHub.