Home » Support » Issue Tracking » Incorrect entity returned by query

Incorrect entity returned by query

Type: BugVersion: 2.7.2Priority: CriticalStatus: FixedReplies: 1
#1

Hello,

during the analysis of a bug in our program we found an issue with a query that does not return the expected entity. We have attached the corresponding database.

The query is:

SELECT dep FROM UsedInDependency AS dep
WHERE dep.sheet.uid == '317j'
AND dep.source.row.q + dep.source.row.offsetEntry.offset >= 1
AND dep.source.row.q + dep.source.row.offsetEntry.offset <= 1
AND dep.target.row.q + dep.target.row.offsetEntry.offset > 1

 

We expect it to find entity 318E, however, the query returns the entity with UID: 318F. However, the returned entity does not fulfill the provided conditions:

source.row.q = 2
source.row.offsetEntry.offset = 1

dep.target.row.q = 2
dep.target.row.offsetEntry.offset = 1

 

Can you please investigate this issue or let us know, what we did wrong?

 

For now, we can use the following workaround that returns the intended result:
SELECT dep FROM UsedInDependency AS dep
WHERE dep.sheet.uid == '317j'
AND dep.source.row.q + dep.source.row.offsetEntry.offset BETWEEN 1 AND 1
AND dep.target.row.q + dep.target.row.offsetEntry.offset > 1

 

Thanks,

The BTC-ES team

 

application/vnd.oasis.opendocument.database iconeppdb.odb (2MB)
Database used for query
#2

Thank you for this report and test case.

Please try version 2.7.3, which should fix this bug.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login