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

Collections can only be valid after they have been read from a file #104

Closed
Tracked by #109
tmadlener opened this issue Jun 24, 2020 · 2 comments
Closed
Tracked by #109

Comments

@tmadlener
Copy link
Collaborator

Collection::isValid only returns true if the collection has previously been read from a file as the m_isValid member is defaulted to false and only set to true in Collection::prepareAfterRead. Naively I would have expected that a newly created collection should also be valid, e.g.

podio::EventStore store;
auto& collection = store.create<ExampleCollection>("aCollection");
collection.isValid(); // should be true but currently returns false

In my opinion the validity of a collection should not depend on whether it has been read from file or whether it has previously been created without an intermediate I/O operation. For the user this should be completely transparent and it should be possible to not care from where the collection is provided as long as it is known to the EventStore.

@hegner
Copy link
Collaborator

hegner commented Jun 24, 2020

Thanks for spotting. This is a mistake in the interface. This validity check should have been kept internal to the implementation.

@hegner
Copy link
Collaborator

hegner commented May 28, 2021

PR #191 fixes this issue

@hegner hegner closed this as completed May 28, 2021
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

2 participants