Comments (5)
That's an EXCELLENT bug report. Thank you!
While I understand that the test failure is what you're reporting, but are you finding any problems with using Person Accounts in general with SObjectSelector or SObjectUnitOfWork?
from fflib-apex-common.
We are still in the very early stages of fflib adoption, and we just enabled Person Accounts a few days ago, so there hasn't been much opportunity to notice problems in general.
We noticed this because at the moment all of the fflib tests are being run when we deploy, so the first deployment after enabling Person Accounts failed with this test failure. We do have a manual workaround for now.
Ideally fflib tests wouldn't be run in our org, but I'm still researching if there's a good way to do that. Right now fflib is just in our source via git submodules.
from fflib-apex-common.
To add to this, the version of fflib_QueryFactory.getChildRelationship
that is causing this issue is only used by the deprecated versions of fflib_QueryFactory.subselectQuery
, so we should not have problems with this outside of the test failure so long as we don't use deprecated functions.
from fflib-apex-common.
@CSigelmann -- thank you again for such a perfect repro case and clear diagnosis of the problem. You are indeed correct that that one test method was using the deprecated addQueryFactorySubselect
method (which relies on inferring the name using the SObject type and hopes that there is only one relationship)
I have submitted PR#493 with the fix and it should be merged shortly
from fflib-apex-common.
And for posterity, the list of relationship names that popped into existence when Person Accounts were enabled wasn't just the one that CSigelmann reported, there were two others which brought the list to:
08:44:15.1 (80775494)|USER_DEBUG|[6]|DEBUG|OpportunitiesAFP__pr
08:44:15.1 (80837740)|USER_DEBUG|[6]|DEBUG|Opportunities
08:44:15.1 (80894484)|USER_DEBUG|[6]|DEBUG|OpportunitiesAgent__pr
08:44:15.1 (80950490)|USER_DEBUG|[6]|DEBUG|PersonOpportunities
from fflib-apex-common.
Related Issues (20)
- Unit test failure in multi-currency org HOT 4
- Deploy button doesn't deploy because there are test failures HOT 1
- Expected a QueryException due to read only user not having access to Opportunity HOT 7
- Switch to Inherited Sharing on SObjectDescribe and SObjectSelector HOT 2
- With latest fflib, do TriggerHandlers become service class consumers? If so what happens to UoW? HOT 6
- Selected tests in fflib_SObjectSelectorTest fail in an org with encryption enabled on Account.Name HOT 2
- Selector Mocks to Include SOQL Query Retrieve Check HOT 1
- fflib_SObjectUnitOfWork doCommitWork executes all dml for all registered types even if there are no changes
- Update README as session recordings are not available HOT 2
- fflib_SObjectDescribe.cls fails to resolve cross-object field paths for Person Accounts
- Aggregate SOQL support. HOT 2
- Disable Savepoint in tests HOT 4
- Inconsistent Code Coverage and Test Failures in fflib-apex-common HOT 1
- fflib_SObjectSelector and fflib_SObjectUnitOfWork have insufficient test code coverage. HOT 2
- Add queryWithBinds to Selector layer HOT 2
- Unit test failing fflib_SecurityUtilsTest & sysadmin_objectAndField_access HOT 8
- Coverage of UnitOfWork class HOT 1
- Versioning HOT 1
- fflib_SObjectSelectorTest Error: 'Assertion Failed: Expected: 12345.67, Actual: 9117.25' HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fflib-apex-common.