How come the first query below returns the expect value when passed an Enum for value ?3 but the second query doesn't return the same value.
Does it matter what order either side of the OR are in ?
@Query("SELECT g " +
"FROM goal g " +
"WHERE g.companyId = ?1 " +
"AND (?2 IS NULL OR g.archived = ?2) " +
-----> "AND (g.type = ?3 OR ?3 IS NULL) ")
@Query("SELECT g " +
"FROM goal g " +
"WHERE g.companyId = ?1 " +
"AND (?2 IS NULL OR g.archived = ?2) " +
-----> "AND (?3 IS NULL OR g.type = ?3) ")