Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
26d2e706
Commit
26d2e706
authored
Nov 23, 2011
by
Leo Gordon
Browse files
bugfix: object adaptor now correctly reconstructs dbID
parent
c2eb1bf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
modules/Bio/EnsEMBL/Hive/DBSQL/BaseAdaptor.pm
modules/Bio/EnsEMBL/Hive/DBSQL/BaseAdaptor.pm
+1
-1
modules/Bio/EnsEMBL/Hive/DBSQL/ObjectAdaptor.pm
modules/Bio/EnsEMBL/Hive/DBSQL/ObjectAdaptor.pm
+3
-1
No files found.
modules/Bio/EnsEMBL/Hive/DBSQL/BaseAdaptor.pm
View file @
26d2e706
...
...
@@ -134,7 +134,7 @@ sub count_all {
$sql
.=
"
WHERE
$constraint
";
}
print
STDOUT
$sql
,"
\n
";
#
print STDOUT $sql,"\n";
my
$sth
=
$self
->
prepare
(
$sql
);
$sth
->
execute
;
...
...
modules/Bio/EnsEMBL/Hive/DBSQL/ObjectAdaptor.pm
View file @
26d2e706
...
...
@@ -45,7 +45,9 @@ sub slicer { # take a slice of the object (if only we could inline in Perl!)
sub
objectify
{
# turn the hashref into an object (if only we could inline in Perl!)
my
(
$self
,
$hashref
)
=
@_
;
return
$self
->
object_class
()
->
new
(
-
adaptor
=>
$self
,
map
{
('
-
'
.
uc
(
$_
)
=>
$hashref
->
{
$_
})
}
keys
%$hashref
);
my
$autoinc_id
=
$self
->
autoinc_id
();
return
$self
->
object_class
()
->
new
(
-
adaptor
=>
$self
,
map
{
('
-
'
.
uc
(
(
$_
eq
$autoinc_id
)
?
'
dbID
'
:
$_
)
=>
$hashref
->
{
$_
})
}
keys
%$hashref
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment