cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeny Ryabitskiy <evgeny.ryabits...@gmail.com>
Subject Run query NOT in transaction
Date Tue, 27 Oct 2009 15:54:41 GMT
Hello 2 everyone!

I have one problem with transaction policy in Cayenne.
I need to run some query without transaction. Why? I am using
Temporary Tables in T-SQL which can't be created in Transaction.
But Cayenne using transaction for every query.

Here is example:

If I run this Query:

Create Table #MYTempTable (someid int)
Insert Into #MYTempTable (someid) Select 0

I got:
 java.sql.SQLException: There was a transaction active when exiting
the stored procedure '****'. The temporary table '#MYTempTable' was
dropped in this transaction either explicitly or implicitly. This
transaction has been aborted to prevent database corruption.


After some research I didn't find any ability to  turn off transaction
for query. Maybe it will be nice to add some API parameter to change
this behavior? )

Evgeny Ryabitskiy.

Mime
View raw message