[MGNLDAM-520] JcrAssetProvider#getQueryString must consider Builder#excludeChildren Created: 14/Oct/14  Updated: 22/Oct/14  Resolved: 22/Oct/14

Status: Closed
Project: Magnolia DAM Module
Component/s: DAM JCR Provider
Affects Version/s: 2.0.4
Fix Version/s: 2.0.5

Type: Bug Priority: Neutral
Reporter: Christoph Meier Assignee: Christopher Zimmermann
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLSTK-1403 Download list does not work properly Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

The method getQueryString in JcrAssetProvider must consider if the Builder has set exludeChildren via Builder#excludeChildren.



 Comments   
Comment by Christopher Zimmermann [ 21/Oct/14 ]

Improved JcrAssetProvider#getQueryString to respect the AssetQuery#includesChildren result.

Comment by Federico Grilli [ 22/Oct/14 ]

AssetQuery.Builder().fromPath("/subpath").excludeChildren().build() produces the query
SELECT * FROM [nt:base] AS asset WHERE([jcr:primaryType] = 'mgnl:asset') AND ISCHILDNODE(asset, '/subpath')", result);
I guess this is very confusing, as the goal is to actually include direct children only and exclude descendants.
IMO, a new method should be created, called excludeDescendants()

Comment by Christopher Zimmermann [ 22/Oct/14 ]

Improve naming in AssetQuery from Children to Descendants and add javadoc. Deprecate old named methods.

Generated at Mon Feb 12 05:00:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.