JPA OR condition with single value
<p>I have a table company: <code>companyId number</code>, <code>companyName varchar</code>, <code>address nvarchar</code>.
I want to achieve a goal that user can query to fetch company either using a id or company name, image there is a search box, user only has to input a single value, then it will fetch company information. </p>

<p>I wrote an repository</p>

<pre><code>@Query(value = "select c from CompanyBasicInfo c where c.companyID = ?1 or c.companyName = ?1 ")
List&lt;CompanyBasicInfo&gt; findByCompanyIDOrCompanyName(@PathVariable String input);
</code></pre>

<p>But when I query, I got an error: <code>Parameter value [10083769] did not match expected type [java.lang.Long (n/a)]</code></p>

<p>How can I solve this problem? Most of the materials available are something like 
<code>findByFirstnameOrLastname</code> which uses two values. Thanks a lot!</p>