Subject: | Entry has no associated object after retriving it from storage. |
Entry has no associated object after retriving it from storage.
perl version: 5.8.8
os version: Linux fireball 2.6.18-6-686 #1 SMP Tue Jun 17 21:31:27 UTC
2008 i686 GNU/Linux
KiokuDB version: 0.27
KiokiDB::Backend::BDB version: 0.14
BerkeleyDB (perl package) version: 0.38
BerkeleyDB version: 4.7.25
How to reproduce:
{
package App::Object;
use Moose;
has indexed_field => (
is => 'rw',
isa => 'Int'
);
__PACKAGE__->meta->make_immutable;
1;
}
package main;
use strict;
use warnings;
use KiokuDB;
use Test::Simple tests => 2;
my $dir = KiokuDB->connect(
"bdb:dir=/home/self/tmp/db/",
create => 1,
);
my $id;
{
my $scope = $dir->new_scope;
my $obj = new App::Object indexed_field => 123;
$id = $dir->store($obj);
my $entry = $dir->live_objects->object_to_entry($obj);
ok $entry->has_object; # ok
}
{
my $scope = $dir->new_scope;
my $obj = $dir->lookup($id);
my $entry = $dir->live_objects->object_to_entry($obj);
ok $entry->has_object; # not ok
}
As result of this bug some features are missed ( for example reindexing
with KiokuDB::Backend::BDB::GIN )