changed find_by method to where method to support other adapters

Fix for #529