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

Adding multiple values to a property before setting the entity's id fails #129

Closed
jbothma opened this issue Sep 13, 2023 · 0 comments
Closed

Comments

@jbothma
Copy link
Contributor

jbothma commented Sep 13, 2023

Steps to reproduce

entity = CompositeEntity(dataset, {"schema": schema})
entity.add(prop, [v1, v2])

Expected:

set(entity.get(prop)) == set(v1, v2)

Actual:

entity.get(prop) == [v1]

This is because the statements created by Enitty.add have id of None.

It's not clear from the documentation that the id must be set before adding values. Perhaps the documentation can improve, but maybe Entity.add should fail a bit more loudly too?

@pudo pudo closed this as completed in c6570f2 Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant