You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Jakob Braeuchi <jb...@gmx.ch> on 2004/08/14 18:19:09 UTC

delete does not include 'ojbConcreteClass' !

hi all,

while working on the new class-discriminator stuff (replacement of 
ojbConcreteClass) i found that we do not use the field 'ojbConcreteClass' when 
deleteing an object, the only attributes used are the pk.

afaik ojbConcreteClass is never part of the pk (at least not in our samples) so 
when deleting objects just by pk we could probably delete more than one row !
i know ojb requires the pk to be unique within a class hierarchy, but if this is 
not the case, more than one obj is gone...

what do you think about including ojbConcreteClass in the delete statement ?

jakob

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: delete does not include 'ojbConcreteClass' !

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi armin,

the class discriminator does not have to be part of the pk today. if it would, 
i'd expect some problems with relationships, because then the discriminator 
should also be part of the fk of the childs.

i do not expect any side effect when including the discriminator in the delete-sql.

jakob

Armin Waibel schrieb:

> With the new class-discriminator PK don't need to be unique across 
> extents anymore - right? So the discriminator field is mandatory for all 
> delete in 1.1?
> 
>  > what do you think about including ojbConcreteClass in the delete
>  > statement ?
> 
> If you don't expect side-effects +1
> 
> Armin
> 
> Jakob Braeuchi wrote:
> 
>> hi all,
>>
>> while working on the new class-discriminator stuff (replacement of 
>> ojbConcreteClass) i found that we do not use the field 
>> 'ojbConcreteClass' when deleteing an object, the only attributes used 
>> are the pk.
>>
>> afaik ojbConcreteClass is never part of the pk (at least not in our 
>> samples) so when deleting objects just by pk we could probably delete 
>> more than one row !
>> i know ojb requires the pk to be unique within a class hierarchy, but 
>> if this is not the case, more than one obj is gone...
>>
>> what do you think about including ojbConcreteClass in the delete 
>> statement ?
>>
>> jakob
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: delete does not include 'ojbConcreteClass' !

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi armin,

the fix is in cvs now.

jakob

Armin Waibel schrieb:
> With the new class-discriminator PK don't need to be unique across 
> extents anymore - right? So the discriminator field is mandatory for all 
> delete in 1.1?
> 
>  > what do you think about including ojbConcreteClass in the delete
>  > statement ?
> 
> If you don't expect side-effects +1
> 
> Armin
> 
> Jakob Braeuchi wrote:
> 
>> hi all,
>>
>> while working on the new class-discriminator stuff (replacement of 
>> ojbConcreteClass) i found that we do not use the field 
>> 'ojbConcreteClass' when deleteing an object, the only attributes used 
>> are the pk.
>>
>> afaik ojbConcreteClass is never part of the pk (at least not in our 
>> samples) so when deleting objects just by pk we could probably delete 
>> more than one row !
>> i know ojb requires the pk to be unique within a class hierarchy, but 
>> if this is not the case, more than one obj is gone...
>>
>> what do you think about including ojbConcreteClass in the delete 
>> statement ?
>>
>> jakob
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: delete does not include 'ojbConcreteClass' !

Posted by Armin Waibel <ar...@apache.org>.
With the new class-discriminator PK don't need to be unique across 
extents anymore - right? So the discriminator field is mandatory for all 
delete in 1.1?

 > what do you think about including ojbConcreteClass in the delete
 > statement ?

If you don't expect side-effects +1

Armin

Jakob Braeuchi wrote:

> hi all,
> 
> while working on the new class-discriminator stuff (replacement of 
> ojbConcreteClass) i found that we do not use the field 
> 'ojbConcreteClass' when deleteing an object, the only attributes used 
> are the pk.
> 
> afaik ojbConcreteClass is never part of the pk (at least not in our 
> samples) so when deleting objects just by pk we could probably delete 
> more than one row !
> i know ojb requires the pk to be unique within a class hierarchy, but if 
> this is not the case, more than one obj is gone...
> 
> what do you think about including ojbConcreteClass in the delete 
> statement ?
> 
> jakob
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org