We're updating the issue view to help you get more done. 

Bulk delete on element collections generates wrong sql when property reference is used

Description

Failure on these tests
org.hibernate.test.propertyref.basic.PropertyRefTest.testJoinFetchPropertyRef
org.hibernate.test.propertyref.basic.PropertyRefTest.testManyToManyPropertyRef
org.hibernate.test.propertyref.basic.PropertyRefTest.testOneToOnePropertyRef

with an error on delete below - Implicit conversion from datatype 'VARCHAR' to 'BIGINT' is not allowed. Use the CONVERT function to run this query

create table USER_SYSTEM (
USER_ID varchar(255) not null,
SYSTEM varchar(255) null
) lock datarows

create table PROPREF_PERS (
id bigint not null,
name varchar(100) null,
person_userid varchar(8) not null,
primary key (id)
) lock datarows

delete
from
USER_SYSTEM
where
(
USER_ID
) in (
select
id
from
PROPREF_PERS
)

Environment

SAP/SYBASE ASE database

Status

Assignee

Steve Ebersole

Reporter

Mahesh Gadgil

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.2.13

Priority

Major