U4-11291 - Paging in the IContentService needs to work with variant data - for both names and property values

Created by Shannon Deminick 30 Apr 2018, 11:34:33 Updated by Stephan 07 May 2018, 07:35:22

Relates to: U4-11288

Subtask of: U4-11278

The tricky part is that content in a paged list can contain both variant and invariant content and properties, this needs to be taken into account for this paging.

Unit tests should be written to support paging with variants for both variant names and variant property values ... first, see if these tests exist


Shannon Deminick 01 May 2018, 03:51:48

WIP PR is here https://github.com/umbraco/Umbraco-CMS/pull/2607

I've created a unit test for simple paging to prove that the results contain the variant information we need and I've allowed for culture parameters in the Content ctor's so you can set the Name in the ctor like we are used to even for a variant, however I've put a fixme in there since the invariant name is null checked before persisting so it seems it must be there anyways.

One thing about the paging is that we will not be able to do any searching based on the variant names which we're probably going to want/need, there are issues with that currently:

*The SQL does not join the variant name tables which we cannot do for paging, We'd need to do some sub query logic in the where statement to make this work *The expression helper that turns an IQuery into SQL will not currently support querying on a dictionary's keys/values which would be required to query on variant names

Shannon Deminick 01 May 2018, 04:58:20

Moving to review but require some feedback on this:

  • What to do about the Name when setting the value?
  • What to do about searching variant names? Do we leave this as a known issue and move on or deal with it now?

Shannon Deminick 02 May 2018, 03:23:48

I've had to merge this PR because I require the 'fix' for the Names thing. But still, i would like this code reviewed and we need to discuss what to do about this name stuff in http://issues.umbraco.org/issue/U4-11286 @zpqrtbnk if you can have a look at the code just to check if there's anything obviously dumb? :)

Stephan 02 May 2018, 11:58:46

@Shandem so IIC the PR has nothing to do with paging, which worked, but is about fixing Names and is related to U4-11286 correct? Am currently reviewing (well reviewing all that's been done in temp8)

Stephan 02 May 2018, 16:00:22

if you confirm, then we can marked that one fixed

Shannon Deminick 03 May 2018, 03:59:10

Well... paging 'works' but searching on names will not (see above)

Stephan 07 May 2018, 07:35:18

Have forked searching on names to U4-11305, closing that one

Priority: Task - Pri 1

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 8.0.0

Sprint: Sprint 84

Story Points: 3

Cycle: 10