Skip to content

Add constructors from base class, and tests to verify behavior. #102

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

Conversation

daveerickson
Copy link

@daveerickson daveerickson commented Dec 17, 2024

The fflib_SObjectSelector class has added the DataAccess enum, and a new constructor to set this parameter. The default behavior of fflib_SObjectSelector sets DataAccess=LEGACY which is used by the current constructors in ApplicationSObjectSelector. The ApplicationSObjectSelector default constructor also sets includeFieldSetFields=true, enforceCRUD=false, and enforceFLS=false.

This PR adds a constructor that takes a DataAccess parameter, and defaults includeFieldSetFields=true like the default constructor. It also adds a constructor that takes both the includeFieldSetFields and DataAccess parameters, matching the new fflib_SObjectSelector constructor.

A test method validating the default behavior (includeFieldSetFields=true, enforceCRUD=false, enforceFLS=false, dataAccess=LEGACY), and new constructor behavior (includeFieldSetFields=true, enforceCRUD=false, enforceFLS=false, dataAccess=USER/SYSTEM_MODE) was added. Constructors were added to the inner class to enable these validations.


This change is Reviewable

@daveerickson
Copy link
Author

Welcome to the new year! I am happy to answer any questions about this PR to help move things along.

Thank you for making commits enabling the automatic checks to succeed.

@john-storey-devops john-storey-devops merged commit 7a022cc into apex-enterprise-patterns:master Feb 18, 2025
1 check passed
@daveerickson daveerickson deleted the selector-add-base-constructors branch February 24, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants