Skip to content

Querying for entities with property fails if using ID

Summary

Querying for entities with a property with a given ID fails (returns zero results). Possibly related to string IDs (it used to work, for example on the demo server) or to #247 (but no fancy permission requirements). And this issue has a small integration test included.

The issue is that a query like this produces no results: FIND Entity WITH 100, where 100 is the ID of a property that is used by some entities.

Expected Behavior

FIND Entity WITH 100 should also yield all Entities which use the property 100.

Actual Behavior

Empty result set.

Steps to Reproduce the Problem

import linkahead as db
rt = db.RecordType(name="RT1").insert()
prop = db.Property(name="prop", datatype=db.DOUBLE).insert()
rec = db.Record().add_parent(rt).add_property(prop, value=23).insert()
results = db.execute_query(f"FIND Entity with {prop.id}")
assert len(results) == 1

Specifications

  • Version: Current dev. Works on current demo server.
Edited by Quazgar
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information