Hi Scott,

Scott C. Gray wrote:
> I think I know what is going on here, but I want to find out if
> this is the "correct" behavior of OJB (I'm using the PB layer 
> of 0.9.5, BTW).
> 
> I have a collection descriptor that I am using for the soul
> purpose of managing cascading deletes:
> 
> <class-descriptor
>     class="com.inventa.schema.node.impl.NodeImpl"
>     table="NODE">
> 
>     ...
> 
>     <collection-descriptor
>         name="noteList"
>         element-class-ref="com.inventa.schema.node.impl.NodeNoteImpl"
>         auto-retrieve="false"
>         auto-update="false"
>         auto-delete="true">
> 
>         <inverse-foreignkey field-id-ref="2"/>
>     </collection-descriptor>
> </class-descriptor>
> 
> That is, I have a Vector in my NodeImpl class called "noteList"
> that will _never_ have anything in it (because I have auto-retrieve
> set to false and I never use it myself), but I have it defined
> because I want the PB to cascade deletes to the NodeNoteImpl object
> when I delete my NodeImpl object.
> 
> The behavior I am getting, however, is that the PB does _not_ 
> attempt to delete any NodeNoteImpl's when I delete a NodeImpl.
> My guess is it is because my noteList Vector is empty.

exactly!

> 
> Is the correct behavior?
> 

works as designed. if the collection to be deleted is empty no elements 
get deleted.

> BTW, (feature request), it would be nice to have a special 
> descriptor for just what I am trying to do--simply define
> a relationship without having to refer to a member field
> of an object to "store" that relationship.
> 

WHat do you want to do with this special descriptor? I don't get your 
idea yet.

cheers,
Thomas

> Thanks!
> -scott
> 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to