Custom primary key cannot be set

Issue #28 wontfix
created an issue

on pypi version



import doqu db = doqu.get_db(backend='docu.ext.tokyo_cabinet', path='var/doqu.tct') db.clear() obj = doqu.Document(a='b'), 'key') u'1' }}}

Comments (4)

  1. Andy Mikhaylenko repo owner

    Thanks for the report. I'm sure this will be fixed in the next release. Per-backend tests for storage and query adapters already exist (and the discovered bugs are fixed). I just haven't had the time to add the new code to the repo yet.

  2. Andy Mikhaylenko repo owner

    Take a look at the method signature:, storage=None, keep_key=False)

    Note that this code:, 'key')

    is actually equivalent to:, keep_key=True)

    There's currently no way to explicitly set the key via Document class. However, this works perfectly with and without Document involved:, 'key')
  3. Log in to comment