Skip to content

Commit

Permalink
[#1792] Add new HibernateException for when there are no results
Browse files Browse the repository at this point in the history
It should get thrown when a user call `.getSingleResultOrNull()` but
the SQL query doesn't return any result. For example, when creating a
stored procedure in PosgtreSQL
  • Loading branch information
DavideD committed Nov 23, 2023
1 parent 4e6bc8d commit db4c3b5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ public interface Log extends BasicLogger {
@Message(id = 79, value = "The configuration property '%1$s' was not provided, or is in invalid format. This is required when using the default DefaultSqlClientPool: either provide the configuration setting or integrate with a different SqlClientPool implementation")
HibernateException blankConnectionString(String property);

@Message(id = 80, value = "No results were returned by the query (you can try running it with '.executeUpdate()'): %1$s")
HibernateException noResultException(String sql);

// Same method that exists in CoreMessageLogger
@LogMessage(level = WARN)
@Message(id = 104, value = "firstResult/maxResults specified with collection fetch; applying in memory!" )
Expand Down

0 comments on commit db4c3b5

Please sign in to comment.