projects
/
dbsrgits/DBIx-Class-ResultSet-WithMetaData.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
ce0b960
)
optimsation to avoid unnecessary finds
Luke Saunders [Tue, 18 May 2010 16:21:38 +0000 (17:21 +0100)]
lib/DBIx/Class/ResultSet/WithMetaData.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/DBIx/Class/ResultSet/WithMetaData.pm
b/lib/DBIx/Class/ResultSet/WithMetaData.pm
index
1cf546b
..
e2ab12b
100644
(file)
--- a/
lib/DBIx/Class/ResultSet/WithMetaData.pm
+++ b/
lib/DBIx/Class/ResultSet/WithMetaData.pm
@@
-157,7
+157,8
@@
method add_row_info (%opts) {
if ($row) {
$id = $self->_mk_id(row => { $row->get_columns });
}
- unless ($self->find($id)) {
+
+ unless ($row || $self->find($id)) {
die 'invalid id passed to add_row_info';
}