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

[BUG] cached queries dont respect :with #171

Closed
unityjaeger opened this issue Jan 2, 2025 · 1 comment
Closed

[BUG] cached queries dont respect :with #171

unityjaeger opened this issue Jan 2, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@unityjaeger
Copy link

Describe the bug

creating entities after a cached query was created makes the query not check for the :with part of the query correctly, doesn't matter if its an entity or component

Reproduction

local world = jecs.World.new()

local component1 = world:component()
local tag1 = world:entity()

local query = world:query(component1):with(tag1):cached()

local entity = world:entity()
world:set(entity, component1, "some data")

for entity in query do
	print(world:has(entity, tag1))
end

Expected Behavior

doesnt output anything, as it doesnt match the query

Actual Behavior

outputs false

@unityjaeger unityjaeger added the bug Something isn't working label Jan 2, 2025
vnnh added a commit to vnnh/jecs that referenced this issue Jan 4, 2025
@Ukendio Ukendio closed this as completed Jan 5, 2025
@Ukendio
Copy link
Owner

Ukendio commented Jan 5, 2025

Fixed as of #173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants