java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.jooq.exception.DataAccessException
org.jooq.exception.InvalidResultException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NoDataFoundException
,TooManyRowsException
An unexpected result was encountered after executing a
Query
. This
exception indicates wrong usage of jOOQ's various fetch methods, or an
integrity problem in your data after query execution, meaning that
the execution of the query in the database is not affected.
This is typically the case in the following situations:
- When you call methods such as
ResultQuery.fetchOne()
and the database returns more than one record (you'll get aTooManyRowsException
). - When you call methods such as
ResultQuery.fetchMap(org.jooq.Field)
and the database returns several records per key. - When you refresh a
TableRecord
usingUpdatableRecord.refresh()
, and the record does not exist anymore in the database (you'll get aNoDataFoundException
).
- Author:
- Lukas Eder
- See Also:
-
Constructor Summary
ConstructorDescriptionInvalidResultException
(String message) Constructor for InvalidResultException. -
Method Summary
Methods inherited from class org.jooq.exception.DataAccessException
getCause, getStackTrace, sqlState, sqlStateClass, sqlStateClass, sqlStateClass, sqlStateClass, sqlStateSubclass, sqlStateSubclass
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidResultException
Constructor for InvalidResultException.- Parameters:
message
- the detail message
-