openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Prud'hommeaux <mprud...@apache.org>
Subject Re: How to turn off sub-selects in updates?
Date Fri, 16 Mar 2007 18:01:57 GMT
Dave-

This does look like a bug in MySQL (see http://bugs.mysql.com/bug.php? 
id=5037 ). Supposedly this is fixed in as of version 5.0.20.

In general, we use subselects for bulk operations because delete and  
update SQL statements do not allow the specification of multiple  
tables, so only the simplest bulk operations would be possible  
without the ability to use subselects.

I can't think of any way to work around this short of manually  
deleting the record instead of performing the bulk delete operation  
(e.g., doing em.remove(em.find(WeblogEntryTagAggregateData.class, 1))).



On Mar 13, 2007, at 7:42 PM, Dave wrote:

> On 3/12/07, Dave <snoopdave@gmail.com> wrote:
>> On 3/12/07, Patrick Linskey <plinskey@bea.com> wrote:
>> > What is the JPQL query that you're issuing that is resulting in  
>> that SQL
>> > statement? One easy way to get this information is by setting the
>> > 'Query' log channel to TRACE.
>>
>> This is the query that caused the above trace.
>>
>>    DELETE FROM WeblogEntryTagAggregateData w WHERE w.weblog = ?1
>
> Ping!
>
> Any idea what might be going wrong with sub-select support in MySQL?
>
> I hope I'm not the first person to try this ;-)
>
> - Dave


Mime
View raw message