ANSI cross join - SQL Server 2000

Description

There is a scope issue with cross joins generated by hibernate for SQL Server 2000. Below shown two cross join examples, the first is analogous to a cross join generated by hibernate which uses non-standard syntax, and the the second uses ANSI syntax. org.hibernate.dialect.SQLServerDialect uses org.hibernate.sql.ANSIJoinFragment to generate the cross join. Shouldn't ANSIJoinFragment use ANSI syntax? (" cross join " vs. ", "). See the attached suggested patch to Hibernate 3.1.2.

– Non-standard cross join syntax (doesn't work)
– Server: Msg 107, Level 16, State 2, Line 1
– The column prefix 'pt' does not match with a table name or alias name used in the query.
select vpp., pt.
from xVS_PriceType pt, xVS_Product vp
left join xVS_Price vpp on vpp.product_id = vp.id and vpp.priceType_id = pt.id

– ANSI cross join syntax (works)
select vpp., pt.
from xVS_Product vp cross join xVS_PriceType pt
left join xVS_Price vpp on vpp.product_id = vp.id and vpp.priceType_id = pt.id

Environment

SQL Server 2000 and org.hibernate.dialect.SQLServerDialect

Status

Assignee

Unassigned

Reporter

amit bhayani

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

3.1.2

Priority

Major