Prefix columns with table in SELECT clause #299
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When
NSDictionaryResultType
is used on a fetch request and a selected column is present on a joined table, an "ambiguous column name: columnName" error results. The columns should be prefixed with tableName.columnName to avoid this ambiguity.I experienced this error
EncryptedStoreErrorMessage = "ambiguous column name: serverId"
with a fetch request onUser
with the predicateunit.domainLeft >= 11 AND unit.domainRight <= 16
, whereUser.unit -> OrgUnit
and bothUser
andOrgUnit
haveserverId
columns.The SQL query generated by ECD:
And the SQL query generated by the default NSSQLiteStoreType:
With these changes, the ECD query is now: