Skip to content

Conversation

@SENya1990
Copy link
Collaborator

@SENya1990 SENya1990 commented Jan 16, 2026

PXDBPackedIntegerArrayAttribute is a special attribute written in a very hacky way.
It derives from PXDBBinaryAttribute which works with byte[] but in reality PXDBPackedIntegerArrayAttribute works with ushort[] property type.

This breaks Acumatica design principle where derived attribute work on properties with the same property type as their base attribute. Thus, the attribute needs special handling in Acuminator.

Changes Overview

  • Added register for well-known special data type attributes and integrated it into the calculation of metadata
  • Added support of PXDBPackedIntegerArrayAttribute
  • Added unit test for PX1023 for PXDBPackedIntegerArrayAttribute

@SENya1990 SENya1990 requested a review from Copilot January 16, 2026 01:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for the PXDBPackedIntegerArrayAttribute, which is a special attribute that breaks Acumatica's design convention by deriving from PXDBBinaryAttribute (which works with byte[]) while actually working with ushort[]. The changes introduce special handling for this attribute to prevent false positive diagnostics.

Changes:

  • Added special metadata handling for PXDBPackedIntegerArrayAttribute to correctly map it to ushort[] type
  • Made PXDBPackedIntegerArrayAttribute nullable to handle cases where it may not be available in older Acumatica versions
  • Updated test method names to use consistent underscore-separated naming convention

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
DataTypeAttributeSymbols.cs Made PXDBPackedIntegerArrayAttribute property nullable to handle version compatibility
FieldTypeAttributesMetadataProvider.cs Added special handling logic for PXDBPackedIntegerArrayAttribute with metadata mapping to ushort[] type
DacWithPXDBPackedIntegerArrayAttribute.cs Added test source file demonstrating proper usage of PXDBPackedIntegerArrayAttribute with ushort[] property
FieldTypeAttributesOnDacPropertyTests.cs Renamed test methods for consistency and added test case for PXDBPackedIntegerArrayAttribute

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SENya1990 SENya1990 requested a review from dropsonic January 16, 2026 01:58
SENya1990 and others added 3 commits January 16, 2026 02:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants