-
Notifications
You must be signed in to change notification settings - Fork 33
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
Publish workflow, querying published content only #126
Comments
agreed. for the time being, i manually put the filter in my queries:
but this is an awful hack and if you add another voter, you would have to update all queries. just while looking for this example i realized that i missed this in one place. we could do some helpers or a phpcr-odm listener maybe (if there even is a query event). but the workflow itself is independent of storage layer, so its a bit tricky... |
what would be cool if we would provide some decorators for this .. ie. the decorators could be provided by the same package as the voter. it could then either add the necessary filters to the query or if its not possible to execute the logic as a query filter, it would then decorate the result set to apply the filters on iteration |
yep, that sounds right. does the code creating the query need to know about them, or can this automatically happen inside phpcr-odm? |
this is probably more of a "stretch goal" for 1.3 .. |
As for now the publish workflow allows to check if a content is "published" or not.
It would be nice to have something that allows to query the database, filtering only published content.
The typical use case of this is when you want to render a list of contents (maybe a long paginated list): you don't want to get 2k documents from the content repository to just show 20 published content.
The text was updated successfully, but these errors were encountered: