Skip to content

Issues with FindEntity #87

@prashastk

Description

@prashastk

Added an entity successfully with this:

# Query
[{'AddEntity': {'class': 'Cell',
                'properties': {'cell_id.number': 2674,
                               'cell_id.timestamp_ms': 1544069566053,
                               'num_images': 2,
                               'run_start_date': {'_date': '2018-12-06T04:04:01'},
                               'sample_id': '1134'}}}]
# Response
[{'AddEntity': {'info': '', 'status': 0}}]

This FindEntity works:

[{'FindEntity': {'class': 'Cell',
                 'constraints': {'cell_id.number': ['==', 2674]},
                 'results': {'count': ''}}}]
[{'FindEntity': {'count': 1, 'status': 0}}] 

These FindEntity give unexpected errors:

  1. For some reason cell_id.timestamp_ms constrain doesn't work:
# Query
[{'FindEntity': {'class': 'Cell',
                 'constraints': {'cell_id.number': ['==', 2674],
                                 'cell_id.timestamp_ms': ['==', 1544069566053]},
                 'results': {'count': ''}}}]

# Response
[{'FailedCommand': 'Transaction', 'info': 'Failed PMGDTransaction', 'status': -1}]

# Additional server error
{
   "info" : "InvalidID: ",
   "status" : -1
}
  1. A missing property abc in the constraint throws an error:
# Query
[{'FindEntity': {'class': 'Cell',
                 'constraints': {'abc': ['==', '1134'],
                                 'cell_id.number': ['==', 2674]},
                 'results': {'count': ''}}}]

# Response
[{'FailedCommand': 'Transaction', 'info': 'Failed PMGDTransaction', 'status': -1}] []

# Additional server error
{
   "info" : "ReadOnly: ",
   "status" : -1
}
  1. Count of 0 throws an error (cell_id.number 12321312 does not exist):
# Query
[{'FindEntity': {'_ref': 1,
                 'class': 'Cell',
                 'constraints': {'cell_id.number': ['==', 12321312]},
                 'results': {'count': ''}}}]

# Response
[{'FailedCommand': 'Transaction', 'info': 'Failed PMGDTransaction', 'status': -1}] []

# Additional server error
{
   "info" : "Null search iterator\n",
   "status" : -1
}

Metadata

Metadata

Assignees

Labels

BugIndicates unexpected or undesired behaviors

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions