retrieve_all now makes sure the item key is defined .. no longer assumes id
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 29 Jun 2006 19:28:28 +0000 (19:28 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 29 Jun 2006 19:28:28 +0000 (19:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4848 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm

index 71ce84b..d8f0929 100644 (file)
@@ -376,7 +376,10 @@ sub runmethod {
        } elsif( $action eq 'retrieve_all' ) {
                $action = 'search';
                $method =~ s/retrieve_all/search/o;
-               @arg = ( { id => { '!=' => undef } } );
+               my $tt = $type;
+               $tt =~ s/\./::/og;
+               my $fmobj = "Fieldmapper::$tt";
+               @arg = ( { $fmobj->Identity => { '!=' => undef } } );
                $method = "$method.atomic";
        }