Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properties not defined on some entities break a result set #56

Open
mwahle opened this issue Dec 10, 2018 · 3 comments
Open

Properties not defined on some entities break a result set #56

mwahle opened this issue Dec 10, 2018 · 3 comments
Labels
Bug Indicates unexpected or undesired behaviors Discussion Needed Require additional context and discussion Priority: Backlog Tasks that are not pressing, but to be tracked and revisited

Comments

@mwahle
Copy link

mwahle commented Dec 10, 2018

Using search criteria to search for entities where one of them does not have the property we search for gives an error message:

db.query([{'AddEntity': {'class': 'Test', 'properties': {'x': 1}}}])
Out[4]: ([{'AddEntity': {'info': '', 'status': 0}}], [])

db.query([{'AddEntity': {'class': 'Test', 'properties': {'x': 2}}}])
Out[5]: ([{'AddEntity': {'info': '', 'status': 0}}], [])

db.query([{'AddEntity': {'class': 'Test'}}])
Out[6]: ([{'AddEntity': {'info': '', 'status': 0}}], [])

db.query([{"FindEntity": {'class': 'Test', 'constraints': {'x': ['==', 1]}}}])
Out[7]: 
([{'FindEntity': {'info': 'Unknown operation type for query\n',
    'status': -1}}],
[])

Simply listing them does work:

db.query([{"FindEntity": {'class': 'Test', 'results': {'list': ['x']}}}])
Out[12]: 
([{'FindEntity': {'entities': [{'x': 'Missing property'}, {'x': 2}, {'x': 1}],
    'returned': 3,
    'status': 0}}],
[])

but only if the results are not sorted:

db.query([{"FindEntity": {'class': 'Test', 'results': {'list': ['x'], 'sort': 'x'}}}])
Out[14]: 
([{'FailedCommand': 'Transaction',
   'info': 'Failed PMGDTransaction',
   'status': -1}],
[])
@luisremis luisremis added the Bug Indicates unexpected or undesired behaviors label Dec 10, 2018
@luisremis
Copy link
Contributor

Thanks Manuel, we really appreciate the minimal reproducible example, thanks for detailing it.

Will work on this ASAP.

@luisremis luisremis added Discussion Needed Require additional context and discussion and removed Bug Indicates unexpected or undesired behaviors labels Dec 10, 2018
@luisremis luisremis removed their assignment Mar 29, 2019
@vishakha041 vishakha041 added Bug Indicates unexpected or undesired behaviors and removed Discussion Needed Require additional context and discussion labels Mar 29, 2019
@ifadams
Copy link
Contributor

ifadams commented Jul 23, 2024

@cwlacewe did this ever get resolved? If not, its a reasonable ask.

@ifadams ifadams added Discussion Needed Require additional context and discussion Priority: Backlog Tasks that are not pressing, but to be tracked and revisited labels Jul 23, 2024
@cwlacewe
Copy link
Contributor

@cwlacewe did this ever get resolved? If not, its a reasonable ask.

@ifadams from my knowledge, this was not resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indicates unexpected or undesired behaviors Discussion Needed Require additional context and discussion Priority: Backlog Tasks that are not pressing, but to be tracked and revisited
Projects
None yet
Development

No branches or pull requests

5 participants