projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e0ec47f
)
add no_check_foreign kludge for gigantic rate imports
author
ivan
<ivan>
Fri, 18 Jul 2008 22:27:14 +0000
(22:27 +0000)
committer
ivan
<ivan>
Fri, 18 Jul 2008 22:27:14 +0000
(22:27 +0000)
FS/FS/Record.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
c2b1284
..
28c6295
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-3,7
+3,9
@@
package FS::Record;
use strict;
use vars qw( $AUTOLOAD @ISA @EXPORT_OK $DEBUG
$conf $me
use strict;
use vars qw( $AUTOLOAD @ISA @EXPORT_OK $DEBUG
$conf $me
- %virtual_fields_cache $nowarn_identical $no_update_diff );
+ %virtual_fields_cache
+ $nowarn_identical $no_update_diff $no_check_foreign
+ );
use Exporter;
use Carp qw(carp cluck croak confess);
use Scalar::Util qw( blessed );
use Exporter;
use Carp qw(carp cluck croak confess);
use Scalar::Util qw( blessed );
@@
-33,6
+35,7
@@
$me = '[FS::Record]';
$nowarn_identical = 0;
$no_update_diff = 0;
$nowarn_identical = 0;
$no_update_diff = 0;
+$no_check_foreign = 0;
my $rsa_module;
my $rsa_loaded;
my $rsa_module;
my $rsa_loaded;
@@
-1902,6
+1905,7
@@
on the column first.
sub ut_foreign_key {
my( $self, $field, $table, $foreign ) = @_;
sub ut_foreign_key {
my( $self, $field, $table, $foreign ) = @_;
+ return '' if $no_check_foreign;
qsearchs($table, { $foreign => $self->getfield($field) })
or return "Can't find ". $self->table. ".$field ". $self->getfield($field).
" in $table.$foreign";
qsearchs($table, { $foreign => $self->getfield($field) })
or return "Can't find ". $self->table. ".$field ". $self->getfield($field).
" in $table.$foreign";