X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0b84f51fd598e4b5a1cb139aa582297d089b1602..abc355d2775cda30c745a277faf1307acb5a249b:/SL/DB/Object.pm?ds=inline diff --git a/SL/DB/Object.pm b/SL/DB/Object.pm index 4c3e18439..3304ed9b6 100755 --- a/SL/DB/Object.pm +++ b/SL/DB/Object.pm @@ -148,7 +148,7 @@ sub save { SL::DB::Object::Hooks::run_hooks($self, 'after_save', $result); 1; - }) || die $self->error; + }) || die $self->db->error; return $result; } @@ -164,7 +164,7 @@ sub delete { SL::DB::Object::Hooks::run_hooks($self, 'after_delete', $result); 1; - }) || die $self->error; + }) || die $self->db->error; return $result; } @@ -324,6 +324,14 @@ Loads objects from the database which haven't been cached before and caches them for the duration of the current request (see L). +If you know in advance that you will likely need all objects of a +particular type then you can pre-cache them by calling the manager's +C function. For example, if you expect to need all unit +objects, you can use Ccache_all> before +you start the actual work. Later you can use +Cload_cached> to retrieve individual objects and be +sure that they're already cached. + This method can be called both as an instance method and a class method. It loads objects for the corresponding class (e.g. both Cload_cached(…)> and