I have a mybatis query that returns a Long value depending on a parameter , but if the parameter doesn´t exist on the db it returns null, but I´m getting this exception:
Mapper method 'mysqlservermethod attempted to return null from a method with a primitive return type (long).
How can I allow to return a null or what other thing can I do so, I can control in my java part for do something when the query returns null or let me know that there are no values that match the query, without doing a select count before?
MyBatys select header:
resultType="java.lang.Long" >