def test(store):
    """Bug report from Stefan Karlsson <> on Dec 3 2001.
    Obj refs can be incorrectly stored to the database as zeroes for newly created objects.
    from Bar import Bar
    from Foo import Foo
    from BarReq import BarReq
    # Since we're the second empty test, double check that the db is really empty
    assert len(store.fetchObjectsOfClass(Bar)) == 0
    assert len(store.fetchObjectsOfClass(Foo)) == 0
    bar = Bar()
    foo = Foo()
    bars = store.fetchObjectsOfClass(Bar)
    assert len(bars) == 1
    bar2 = bars[0]
    assert bar2 is bar
    assert is not None # the sign of the bug in question
    assert is foo # what we should expect
    bar = store.fetchObjectsOfClass(Bar)[0]
    assert is not None