+ foreach my $v ( ref($value) ? keys %$value : ($value) ) {
+ next if grep { $v == $_->$key() } @records;
+
+ $opt{hashref}->{$key} = $v;
+ my $record = qsearchs( {
+ 'table' => $opt{table},
+ 'addl_from' => $opt{'addl_from'},
+ 'hashref' => $hashref,
+ 'extra_sql' => $extra_sql,
+ });
+ push @records, $record if $record;
+
+ }