title: Operator does not exist: integer ~~ integer
body: <p>When sending postman get request for findbyid it gives a 500 internal server error and the following error in the terminal:
  org.postgresql.util.PSQLException: ERROR: operator does not exist: integer ~~ integer
  Hint: No operator matches the given name and argument types. You might need to add explicit type casts.</p>
  <p>My User repository interface</p>
  <pre><code>public interface UserEntityRepository extends JpaRepository&lt;UserEntity,Integer&gt; {
  
      UserEntity findByName(String name);
  
      @Query(value = &quot;select * from user_table where cast(id as int) like :id&quot;,nativeQuery = true)
      UserEntity findByUserById(Integer id);
  </code></pre>
  <p>My base Entity for creating ids:</p>
  <pre><code>public class BaseEntity {
      @Getter
      @Setter
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Integer id;
  }
  </code></pre>
  <p>My psql code:</p>
  <pre><code>id serial not null
          constraint user_table_pk
              primary key,
  </code></pre>