Originally I was toying with the notion of simply deleting all child
channels (assuming you have permissions to) of a parent when you called
channel.software.delete() on the parent.  Since we don't allow this in
the web ui I decided to simply throw an error telling you to delete the
child channels first.   (Maybe we could add a 'recursiveDelete()' call
to do this, as I could see it being useful).

So in my initial work you actually needed all the child channel objects
in order to delete them.  But now since I am just needing to know if
there are any child channels or not (in order to throw an error), I
don't really need to load them all.  I guess I just left it there since
I thought it might be useful in some other place and I would have had to
change the query and method from my previous work.  :}

Anyways, I can switch it to just query for emptiness if you feel that
strongly, although it's not loading that much data on average (probably
less than 5 channels).

-Justin

Jesus M. Rodriguez wrote:
> Justin,
>
> Do we use listAllChildren elsewhere? Seems like a big query just to
> see if there is anything to do.
> A hasAnyChildren query "select count(id) from Channel" might have been
> better. I could simply be
> overreacting, but if we don't need to load a bunch of Channels, why do it.
>
> http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=9c82f17408dafc30a97ec5eed934970662fecf1a
>
> thanks
> jesus
>
> _______________________________________________
> Spacewalk-devel mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/spacewalk-devel
>   

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to