Skip to content

Repeat _ids #7

@rmcgibbo

Description

@rmcgibbo

I seem to be getting multiple repeated _ids when the db is opened and closed repeatedly, and each session only inserts one entry. Is this expected?

>>> TinyDB('db.json').insert({'x': 1})
>>> TinyDB('db.json').insert({'x': 1})
>>> TinyDB('db.json').all()
[{u'_id': 0, u'x': 1}, {u'_id': 0, u'x': 1}]

This is with 1.2.0 from pypi

$ pip freeze | grep tinydb
tinydb==1.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions