]
Gail Badner commented on HHH-3509:
----------------------------------
Hibernate actually creates the temp table using "create table #blah(....)".
I believe the problem is due to tempdb not being properly configured to allow DDL in
transactions. Hibernate swallows the exception on the create statement, so an exception is
thrown on the insert statement instead.
Sybase - Insert into temp table is in inverted order
-----------------------------------------------------
Key: HHH-3509
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3509
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.4.sp1
Environment: Branch_3_2_4_SP1_CP with Sybase 15
Reporter: Juraci Paixao Krohling
As per Sybase documentation [1], this is the supported way to create temp tables based on
the results of a select:
select type, "Total_amount" = sum(advance)
into #whatspent
from titles
group by type
But Hibernate [2] is generating:
insert into #Vehicle select vehicle0_.id as id from ( select id, vin, owner, 3 as clazz_
from SUV union select id, vin, owner, 4 as clazz_ from Pickup union select id, vin, owner,
1 as clazz_ from Car union select id, vin, owner, 2 as clazz_ from Truck ) vehicle0_
[1]
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15...
[2] BulkManipulationTest#testTempTableGenerationIsolation
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: