-
Notifications
You must be signed in to change notification settings - Fork 9
Bugfix/atr 940 dev pxdb packed integer array support #650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
…into the algorithm determining data type attribute's metadata
There was a problem hiding this 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.
...uminator/Acuminator.Utilities/Roslyn/Semantic/Symbols/Attributes/DataTypeAttributeSymbols.cs
Outdated
Show resolved
Hide resolved
...minator/Acuminator.Utilities/Roslyn/PXFieldAttributes/FieldTypeAttributesMetadataProvider.cs
Show resolved
Hide resolved
...minator/Acuminator.Utilities/Roslyn/PXFieldAttributes/FieldTypeAttributesMetadataProvider.cs
Outdated
Show resolved
Hide resolved
...minator/Acuminator.Utilities/Roslyn/PXFieldAttributes/FieldTypeAttributesMetadataProvider.cs
Outdated
Show resolved
Hide resolved
...minator/Acuminator.Utilities/Roslyn/PXFieldAttributes/FieldTypeAttributesMetadataProvider.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
PXDBPackedIntegerArrayAttributeis a special attribute written in a very hacky way.It derives from
PXDBBinaryAttributewhich works withbyte[]but in realityPXDBPackedIntegerArrayAttributeworks withushort[]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
PXDBPackedIntegerArrayAttributePXDBPackedIntegerArrayAttribute