-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: DML Upate for joined subclass
PostPosted: Mon Jan 30, 2006 12:38 pm 
Newbie

Joined: Mon Jan 23, 2006 10:04 am
Posts: 9
Hi,

I have got problems using DML update in combination with joined subclass.
When I call statement like:

Code:
UPDATE joinedSubClass SET ATRIBUTE=10



I got following exception:

HibernateException( "cannot perform multi-table updates using dialect not supporting temp tables" ) from MultiTableUpdateExecutor .

I don't undestand why Hibernate need to create temporary tables? Why it does'not simply call on or more updates? (depends on which column do I update)?

Who is right? My idea about how joined sublcass should work or Hibernate implementation of DML?



Hibernate version: 3.1.1
Database: Firebird 1.5.3


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 1:33 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
because the structure is done across multiple tables it cannot be done in one single update and if you do it in mutliple updates the following update statements might now match correctly on the now changed columns...thus the need for storing the related ids in a temp table.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Check for changed tables
PostPosted: Mon Jan 30, 2006 1:42 pm 
Newbie

Joined: Mon Jan 23, 2006 10:04 am
Posts: 9
I mean it's easy to check, whether one or more tables are changed.
At least for simple statements as mine was.
Can I commit this patch?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 2:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
eh - yo did not mention any patch in the first posting...if you have code that improves hibernate then yes, feel free.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.