Skip to content

SQL Server query causes MSSQLSERVER_4104 #3185

Closed
@NecatiMeral

Description

@NecatiMeral

Error message: The multi-part identifier "%.*ls" could not be bound.

I'll collect more details and create a test ficture to reproduce the issue.
Just taking a Issue id and notes for fixture here.

Generated SQL in our environment

SELECT contentite0_.formcaption as col_0_0_
FROM ContentItem contentite0_, tapplikation category1_ 
left OUTER JOIN ContentItem contentite2_ ON contentite0_.Category=contentite2_.Id
WHERE contentite0_.Category=category1_.Id
AND category1_.Id=?
AND (contentite2_.Id is null OR contentite2_.Id=0)

Generated SQL in testing fixture (looks good)

select contentite0_.Name as col_0_0_
from ContentItem contentite0_ 
inner join Category category1_ on contentite0_.Category=category1_.Id 
left outer join ContentItem contentite2_ on contentite0_.Parent=contentite2_.Id
where category1_.Id=1
and (contentite2_.Id is null or contentite2_.Id=0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions