pict-section-recordset 1.9.0 → 1.9.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pict-section-recordset",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Pict dynamic record set management views",
|
|
5
5
|
"main": "source/Pict-Section-RecordSet.js",
|
|
6
6
|
"files": [
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"browser-env": "^3.3.0",
|
|
38
38
|
"eslint": "^9.28.0",
|
|
39
39
|
"jquery": "^3.7.1",
|
|
40
|
-
"pict": "^1.0.
|
|
40
|
+
"pict": "^1.0.373",
|
|
41
41
|
"pict-application": "^1.0.34",
|
|
42
|
-
"pict-docuserve": "^1.4.
|
|
42
|
+
"pict-docuserve": "^1.4.19",
|
|
43
43
|
"pict-service-commandlineutility": "^1.0.19",
|
|
44
44
|
"quackage": "^1.3.0",
|
|
45
45
|
"typescript": "^5.9.3"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"fable-serviceproviderbase": "^3.0.19",
|
|
49
49
|
"pict-provider": "^1.0.13",
|
|
50
50
|
"pict-router": "^1.0.10",
|
|
51
|
-
"pict-section-form": "^1.
|
|
51
|
+
"pict-section-form": "^1.1.9",
|
|
52
52
|
"pict-template": "^1.0.15",
|
|
53
53
|
"pict-view": "^1.0.68",
|
|
54
54
|
"sinon": "^21.0.1"
|
|
@@ -535,11 +535,19 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
535
535
|
const tmpFieldHumanName = this.getHumanReadableFieldName(pSchemaField);
|
|
536
536
|
const isUserAuditField = ['CreatingIDUser', 'DeletingIDUser', 'UpdatingIDUser'].includes(pSchemaField);
|
|
537
537
|
const customFilterClauses = this.options.Filters?.[pSchemaField];
|
|
538
|
-
|
|
538
|
+
// The entity's own identity column (AutoIdentity / AutoGUID) — i.e. the primary key.
|
|
539
|
+
const isOwnIdentityField = pMeadowSchemaField && (pMeadowSchemaField.Type === 'AutoIdentity' || pMeadowSchemaField.Type === 'AutoGUID');
|
|
540
|
+
const isForeignKeyLike = pSchemaField.startsWith('ID') || pSchemaField.startsWith('ParentID') || isUserAuditField || customFilterClauses;
|
|
541
|
+
if (isForeignKeyLike)
|
|
539
542
|
{
|
|
540
543
|
for (const customField of Array.isArray(customFilterClauses) ? customFilterClauses : [customFilterClauses])
|
|
541
544
|
{
|
|
542
|
-
|
|
545
|
+
// The table the picker pulls from: an explicit RemoteTable, else this
|
|
546
|
+
// recordset's declared Entity when the column is our own primary key (the PK
|
|
547
|
+
// references our own records), else the name peeled from the column for a
|
|
548
|
+
// plain foreign key. Peeling alone is the defect — a lake PK like
|
|
549
|
+
// `IDC182_HMA_MixDesign` peels to a table name that is not the entity name.
|
|
550
|
+
const remoteTableName = customField?.RemoteTable || (isOwnIdentityField ? this.options.Entity : pSchemaField.split('ID')[1]);
|
|
543
551
|
const fieldName = this.getHumanReadableFieldName(pSchemaField);
|
|
544
552
|
tmpFieldFilterClauses.push(Object.assign(
|
|
545
553
|
{
|
|
@@ -552,6 +560,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
552
560
|
"EntityListEntryTemplate": this.getEntityListEntryTemplate(remoteTableName),
|
|
553
561
|
"CoreConnectionColumn": pSchemaField,
|
|
554
562
|
"RemoteTable": `${ remoteTableName }`,
|
|
563
|
+
"URLPrefix": this.options.URLPrefix,
|
|
555
564
|
"JoinExternalConnectionColumn": `ID${ remoteTableName }`,
|
|
556
565
|
"JoinInternalConnectionColumn": pSchemaField,
|
|
557
566
|
'DisplayName': `Selected Records`,
|
|
@@ -561,7 +570,10 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
561
570
|
}, customField));
|
|
562
571
|
}
|
|
563
572
|
}
|
|
564
|
-
|
|
573
|
+
// The primary key is also a plain integer key, so it ALSO falls through to the
|
|
574
|
+
// Exact / In Range clauses below. A real foreign key gets only the picker; ordinary
|
|
575
|
+
// columns are matched by type.
|
|
576
|
+
if (!isForeignKeyLike || isOwnIdentityField)
|
|
565
577
|
{
|
|
566
578
|
switch (tmpFieldType)
|
|
567
579
|
{
|
|
@@ -233,6 +233,7 @@ class ViewRecordSetSUBSETFilterEntityReferenceBase extends ViewRecordSetSUBSETFi
|
|
|
233
233
|
Destination: pOffset > 0 ? `${this.getInformaryAddressPrefix()}${pClauseInformaryAddress}.SearchResultsAppend` : `${this.getInformaryAddressPrefix()}${pClauseInformaryAddress}.SearchResults`,
|
|
234
234
|
RecordStartCursor: pOffset,
|
|
235
235
|
PageSize: this.options.PageSize,
|
|
236
|
+
URLPrefix: tmpClause.URLPrefix,
|
|
236
237
|
}
|
|
237
238
|
],
|
|
238
239
|
() =>
|