Skip to content
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

Regression 4.9.2 where aliased ECClassId switch from returning classId to className #7279

Merged
merged 5 commits into from
Oct 19, 2024

Conversation

khanaffan
Copy link
Contributor

  1. CTE query returning classid switch from className to classId in 4.9.x. This broke a user.
  2. PR 7235 Fix CTE, but this requires properly handling extendType information. This result in another break in behavior where aliased classid property was return as className. In 4.8.x/ 4.9.0 it used to return Id not class name. This break only happens for Concurrent Query for ECSqlStatement was fine as it set a flag called DoNotConvertClassIdsToClassNamesWhenAliased to reproduce previous behavior.
  3. This PR also set DoNotConvertClassIdsToClassNamesWhenAliased for concurrent query to reproduce behavior of classId returning class name when aliased to be compilable with 4.8.x

First query that broke user is following

SELECT t(aClassId) AS (SELECT ECClassId FROM Bis.Element) SELECT * FROM t
-- 4.8.x return className
-- 4.9.0 return classId
SELECT ECClassId AS aClassId FROM Bis.Element
--4.9.0 returned classId
--4.9.2 return className

After current fix

SELECT t(aClassId) AS (SELECT ECClassId FROM Bis.Element) SELECT * FROM t
-- return className as in 4.8.x
SELECT ECClassId AS aClassId FROM Bis.Element
-- returned classId  as in 4.8.x

imodel-native: iTwin/imodel-native#891

@pmconne pmconne enabled auto-merge (squash) October 18, 2024 23:33
@pmconne pmconne disabled auto-merge October 19, 2024 10:14
@pmconne pmconne merged commit 0716d56 into master Oct 19, 2024
14 checks passed
@pmconne pmconne deleted the affanK/regression_classid branch October 19, 2024 10:14
@khanaffan
Copy link
Contributor Author

@Mergifyio backport release/4.9.x

Copy link
Contributor

mergify bot commented Oct 21, 2024

backport release/4.9.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 21, 2024
…d to className (#7279)

Co-authored-by: Affan Khan <khanaffan@users.noreply.github.com>
Co-authored-by: imodeljs-admin <38288322+imodeljs-admin@users.noreply.github.com>
Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com>
(cherry picked from commit 0716d56)

# Conflicts:
#	common/config/rush/pnpm-lock.yaml
#	core/backend/package.json
#	test-apps/display-test-app/android/imodeljs-test-app/app/build.gradle
#	test-apps/display-test-app/ios/imodeljs-test-app/imodeljs-test-app.xcodeproj/project.pbxproj
#	tools/internal/ios/core-test-runner/core-test-runner.xcodeproj/project.pbxproj
khanaffan added a commit that referenced this pull request Oct 21, 2024
…d to className (#7279)

Co-authored-by: Affan Khan <khanaffan@users.noreply.github.com>
Co-authored-by: imodeljs-admin <38288322+imodeljs-admin@users.noreply.github.com>
Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com>
aruniverse pushed a commit that referenced this pull request Oct 22, 2024
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