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

Improve error message when in instance query $ is ambiguous. #7565

Open
khanaffan opened this issue Jan 16, 2025 · 0 comments
Open

Improve error message when in instance query $ is ambiguous. #7565

khanaffan opened this issue Jan 16, 2025 · 0 comments
Labels
ecdb ECDb and ECSQL related issues

Comments

@khanaffan
Copy link
Contributor

Describe the bug
for query

select  $->COBIE? as cobie from bis.PhysicalElement pe
            join 
            (select 
                el.ecinstanceid as id, 
            from bis.element as el ) as aa on pe.TypeDefinition.id = aa.id 
            join bis.physicalPartition pp on pp.ecinstanceid = pe.model.id            
            group by cobie

we get error

Error: Expression 'ECClassId' in ECSQL statement is ambiguous.

Which basically mean that $->COBIE need to be <alias>.$->COBIE or pe.$->COBIE. This is because instance query need ECInstanceId and ECClassId and there are two ECClassId in scope. pp.ECClassId and pe.ECClassId

reported by @glenworrall

@khanaffan khanaffan added the ecdb ECDb and ECSQL related issues label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecdb ECDb and ECSQL related issues
Projects
None yet
Development

No branches or pull requests

1 participant