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.