datajoint / datajoint-matlab

Relational data pipelines for the science lab
MIT License
42 stars 37 forks source link

fetching 'KEY' error #382

Open davidgodinez opened 2 years ago

davidgodinez commented 2 years ago

Bug Report

Description

When making a fetch, using the syntax table_name.fetchn('KEY') brings about an attribute error.

Reproducibility

Include:

Error in dj.internal.GeneralRelvar/compile (line 682) header.project(self.operands(2:end));

Error in dj.internal.GeneralRelvar/fetch (line 212) [hdr, sql_] = self.compile;

Error in dj.internal.GeneralRelvar/fetchn (line 285) s = self.fetch(varargin{:});


### Expected Behavior
The expected behavior is that the key would be fetched. 

### Screenshots
<img width="1675" alt="Screen Shot 2022-02-02 at 7 24 08 PM" src="https://user-images.githubusercontent.com/43123708/152376781-b2dba0ef-d2ca-476c-9416-3ce8682d05ae.png">
<img width="822" alt="Screen Shot 2022-02-03 at 9 45 59 AM" src="https://user-images.githubusercontent.com/43123708/152376890-20603c83-320d-459f-bee7-ae0e510f7975.png">
dimitri-yatsenko commented 2 years ago

dataJoint-MATLAB does not have "KEY" implemented. To get the key from table q, one just omits all arguments in fetch: q.fetch()

davidgodinez commented 2 years ago

Should we change our documentation here in that case?