title: How to use oracle NVL function in spring data repository nativeQuery
body: <p>I am trying to use oracle' NVL function in nativeQuery of Spring Data Repository.</p>
  
  <p>While i am passing <code>null</code> value in <code>programId</code> parameter then it is throwing exception <code>(ORA-00932: inconsistent datatypes: expected NUMBER got BINARY)</code> and if i am passing a valid value in "programId" then it is working properly.</p>
  
  <pre><code>public interface ProgramRulesRepository
  {
    public static final String FIND_PROGRAM_RULES_BY_PARTICIPANT_ID_AND_ROLE_OR_PROGRAM = " SELECT DISTINCT pr.id , pr.program_id , prgm.display_name , pr.group_id , pr.type , pr.cmmo_key FROM  program prgm , program_rule pr , program_audience pa , participant_audience paa WHERE prgm.id = pa.program_id AND pr.program_id = pa.program_id AND pa.audience_id = paa.audience_id AND pr.type = :roleType  AND paa.participant_id = :participantId "
        + " AND pr.program_id = NVL ( :programId ,pr.program_id )";
  
    @Query( value = FIND_PROGRAM_RULES_BY_PARTICIPANT_ID_AND_ROLE_OR_PROGRAM, nativeQuery = true )
  List&lt;Object[]&gt; findByParticipantIdAndRoleTypeOrProgramId( @Param( "participantId" ) Long participantId, @Param( "roleType" ) String roleType, @Param( "programId" ) Long programId );
  
  
  }
  </code></pre>
  
  <p>Exception :</p>
  
  <pre><code>Caused by: java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
  </code></pre>