openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manie...@poczta.onet.pl
Subject Re: Re: Removing entity with Embedded field
Date Wed, 25 Feb 2009 14:51:10 GMT
Hi Pinaki,

How can I verify the issue? Shall I download daily snapshot?

Regards,
Marcin

 
users@openjpa.apache.org napisaƂ(a): 
 > 
 > I had put a fix for this issue recently OPENJPA-935. 
 > Will the original reporter please verify?
 > 
 > OpenJPA makes a decision during bulk delete whether the delete operation
 > involves a single table only. That decision was not accounting for cascade
 > behavior for embedded fields. 
 > 
 > [1] http://issues.apache.org/jira/browse/OPENJPA-935
 > 
 > 
 > 
 > Jeremy Bauer wrote:
 > > 
 > > Hi Marcin,
 > > 
 > > I observe the same behavior when the base entity contains an embeddable.
 > > Without an embeddable, the provider issues a single delete (as expected).
 > > Since OpenJPA is operating on a single table, I don't see why multiple
 > > deletes are necessary.  Unless I'm missing something, this appears to be a
 > > bug in the provider.  Please open a JIRA.
 > > 
 > > -Jeremy
 > > 
 > > On Thu, Feb 19, 2009 at 6:37 AM, <maniek45@poczta.onet.pl> wrote:
 > > 
 > >> Hi,
 > >>
 > >> I have a following beans:
 > >>
 > >> @Embeddable
 > >> class A {
 > >> int field1
 > >> }
 > >>
 > >> @Entity
 > >> class B {
 > >> @Id
 > >> long id;
 > >>
 > >> int field2
 > >>
 > >> @Embedded
 > >> A field3
 > >> }
 > >>
 > >> When I trying to delete all instances of B entity from data storage by
 > >> "delete from B" I got:
 > >>
 > >> 1. Query ("select" statement) for all B instances
 > >> 2. For each instance from 1. delete statement
 > >>
 > >> Why this is not delete by simple "delete from B" sql statement?
 > >>
 > >> Regards,
 > >> Marcin
 > >>
 > > 
 > > 
 > 
 > -- 
 > View this message in context: http://n2.nabble.com/Removing-entity-with-Embedded-field-tp2354162p2374113.html
 > Sent from the OpenJPA Users mailing list archive at Nabble.com.
 > 


Mime
View raw message