@fjell/core 4.4.46 → 4.4.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -284,7 +284,7 @@ var itemKeyToLocKeyArray = (ik) => {
284
284
  let lka = [];
285
285
  if (isComKey(ik)) {
286
286
  const ck = ik;
287
- lka = [...ck.loc, { kt: ck.kt, lk: ck.pk }];
287
+ lka = [...ck.loc];
288
288
  } else {
289
289
  const pk = ik;
290
290
  lka = [{ kt: pk.kt, lk: pk.pk }];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fjell/core",
3
3
  "description": "Core Item and Key Framework for Fjell",
4
- "version": "4.4.46",
4
+ "version": "4.4.47",
5
5
  "keywords": [
6
6
  "core",
7
7
  "fjell"
package/src/key/KUtils.ts CHANGED
@@ -382,9 +382,10 @@ export const itemKeyToLocKeyArray =
382
382
  let lka: Array<LocKey<L1 | L2 | L3 | L4 | L5>> = [];
383
383
  if (isComKey(ik)) {
384
384
  const ck = ik as ComKey<S, L1, L2, L3, L4, L5>;
385
- // Location arrays should be ordered from parent to child (root to leaf)
386
- // So parent locations come first, then the current item
387
- lka = [...ck.loc, { kt: ck.kt, lk: ck.pk } as unknown as LocKey<L1 | L2 | L3 | L4 | L5>];
385
+ // For composite keys, return only the parent location keys (ck.loc)
386
+ // Location arrays are ordered child-to-parent per KTA hierarchy: ['child', 'parent', 'grandparent']
387
+ // This is used for aggregation queries where we want to find sibling items at the same location
388
+ lka = [...ck.loc];
388
389
  } else {
389
390
  const pk = ik as PriKey<S>;
390
391
  lka = [{ kt: pk.kt, lk: pk.pk } as unknown as LocKey<L1 | L2 | L3 | L4 | L5>];