Skip to content

feat: Added new isset method for ArrayStruct#58

Merged
Fabian Boensch (En0Ma1259) merged 2 commits intomainfrom
feat/struct-isset-method
Apr 21, 2026
Merged

feat: Added new isset method for ArrayStruct#58
Fabian Boensch (En0Ma1259) merged 2 commits intomainfrom
feat/struct-isset-method

Conversation

@En0Ma1259
Copy link
Copy Markdown
Member

Added a new method, to check whether a property is set or not

Copy link
Copy Markdown
Contributor

@cyl3x Michel (cyl3x) left a comment

Choose a reason for hiding this comment

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

allowNull implies that you want to avoid properties which are null but per type definition not allowed to be - which I think is not good. isset should only check if a property is set, if its set but null its also fine. We should adjust the type definitions if we expect nullable properties

@En0Ma1259
Copy link
Copy Markdown
Member Author

allowNull implies that you want to avoid properties which are null but per type definition not allowed to be - which I think is not good. isset should only check if a property is set, if its set but null its also fine. We should adjust the type definitions if we expect nullable properties

Even though a field is, by definition, a required field, it can still be set to null or left blank in the SDK (Criteria->addFields()). The same applies to associations if they have not been added to the Criteria.

So, in order to distinguish whether something is set or is null, we would need to build in such a distinction so that we can react accordingly

To be more correct (not 100%), we need to create a new major version which changes the return values of almost every "Entity" method to nullable

@En0Ma1259 Fabian Boensch (En0Ma1259) merged commit b506ae4 into main Apr 21, 2026
12 checks passed
@En0Ma1259 Fabian Boensch (En0Ma1259) deleted the feat/struct-isset-method branch April 21, 2026 05:49
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.

3 participants