Skip to content

fix: Support 'KEY' in fetch() for backward compatibility#1384

Merged
dimitri-yatsenko merged 1 commit intomaint/2.0from
fix/fetch-KEY-support
Feb 5, 2026
Merged

fix: Support 'KEY' in fetch() for backward compatibility#1384
dimitri-yatsenko merged 1 commit intomaint/2.0from
fix/fetch-KEY-support

Conversation

@dimitri-yatsenko
Copy link
Member

Summary

  • Restores support for fetch('KEY') which was a special syntax in DataJoint 0.14
  • fetch('KEY') returns list of primary key dicts
  • fetch('KEY', 'col') returns (keys_list, col_array)
  • fetch('KEY', as_dict=True) expands KEY to primary key columns

Fixes #1381

Test plan

  • Added test_fetch_KEY - verifies fetch('KEY') returns list of dicts
  • Added test_fetch1_KEY - verifies fetch1('KEY') returns single dict
  • Added test_fetch_KEY_with_other_attrs - verifies mixed attrs work

🤖 Generated with Claude Code

In DataJoint 0.14, fetch('KEY') was a special syntax that returned
primary key columns as list of dicts. This was broken in 2.0.

Changes:
- fetch('KEY') returns list of primary key dicts
- fetch('KEY', 'col') returns (keys_list, col_array)
- fetch('KEY', as_dict=True) expands KEY to primary key columns

Fixes #1381

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dimitri-yatsenko dimitri-yatsenko merged commit da0cc0c into maint/2.0 Feb 5, 2026
7 checks passed
@dimitri-yatsenko dimitri-yatsenko deleted the fix/fetch-KEY-support branch February 5, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant