diff --git a/dalesbred/src/main/java/fi/evident/dalesbred/Database.java b/dalesbred/src/main/java/fi/evident/dalesbred/Database.java
index <HASH>..<HASH> 100644
--- a/dalesbred/src/main/java/fi/evident/dalesbred/Database.java
+++ b/dalesbred/src/main/java/fi/evident/dalesbred/Database.java
@@ -172,6 +172,13 @@ public final class Database {
         }
     }
 
+    /**
+     * Returns true if and only if the current thread has an active transaction for this database.
+     */
+    public boolean hasActiveTransaction() {
+        return activeTransaction.get() != null;
+    }
+
     private <T> T withSuspendedTransaction(@Nullable Isolation isolation, @NotNull TransactionCallback<T> callback) {
         DatabaseTransaction suspended = activeTransaction.get();
         try {
Added method for checking if there's an active transaction.