<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/101994/">http://git.reviewboard.kde.org/r/101994/</a>
     </td>
    </tr>
   </table>
   <br />















<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I also think marking the thing/resource as a sub-resource would be a good solution.
But this should happen on a per application level. 

I.e. application X marks a subresource, which would be automatically deleted if a links to it are removed,
and another application Y added properties to the resource we should still not delete it, since otherwise we might delete properties created by a user.
This is especially a point if Pimo:Things are marked as sub-resources of indexed resources

Other than that I fully agree with the proposed behavior that sub-resources should also be removed on removeProperty.</pre>
<br />








<p>- Christian</p>


<br />
<p>On July 18th, 2011, 3:04 p.m., Sebastian Trueg wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Nepomuk.</div>
<div>By Sebastian Trueg.</div>


<p style="color: grey;"><i>Updated July 18, 2011, 3:04 p.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">So far we have sub-resource handling in removeResources and removeDataByApplication. It means that sub-resources are removed if their super-resources are removed, too and no other resource references them. However, this is not done in removeProperty and removeProperties. IMHO it should be done, too. As soon as the nao:hasSubResource relation is removed there is no relation between super- and sub-resource anymore rendering the sub-resource pointless.

The attached patch simply adds two unit tests. It does not include the actual code which implements the sub-resource handling in removeProperty and removeProperties. The point of this review request is to determine if the behavior explained above is what we want or not.</pre>
  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>nepomuk/services/storage/test/datamanagementmodeltest.h <span style="color: grey">(a46e525)</span></li>

 <li>nepomuk/services/storage/test/datamanagementmodeltest.cpp <span style="color: grey">(f2ca76e)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/101994/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>