</permacrud>
</class>
+ <class id="rlcd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_copy_deleted" oils_persist:readonly="true" reporter:core="true" reporter:label="Last Copy Delete Time">
+ <oils_persist:source_definition>
+
+ SELECT b.id,
+ MAX(dcp.edit_date) AS last_delete_date
+ FROM biblio.record_entry b
+ JOIN asset.call_number cn ON (cn.record = b.id)
+ JOIN asset.copy dcp ON (cn.id = dcp.call_number)
+ WHERE NOT b.deleted
+ GROUP BY b.id
+ HAVING SUM( CASE WHEN dcp.deleted THEN -1 ELSE 0 END) < 0
+
+ </oils_persist:source_definition>
+ <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
+ <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Delete Date/Time" name="copy_delete_date" reporter:datatype="timestamp"/>
+ </fields>
+ <links>
+ <link field="id" reltype="has_a" key="id" map="" class="bre"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <retrieve/>
+ </actions>
+ </permacrud>
+ </class>
+
+
<!-- ********************************************************************************************************************* -->
<!-- What follows is a set of example extensions that are useful for PINES. Comment out or remove if you don't want them. -->
<!-- ********************************************************************************************************************* -->