Marius K (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *commented* on HHH-16216 (
https://hibernate.atlassian.net/browse/HHH-16216?atlOrigin=eyJpIjoiODRkZm...
)
Re: @Query creates additional not null checks for SybaseASEDialect (
https://hibernate.atlassian.net/browse/HHH-16216?atlOrigin=eyJpIjoiODRkZm...
)
unfortunately I am not able to set this to true in our database.
As far as I understand ansinull : If set to true one has to use is not null. If set to
false one can use is not null or != null.
Example
create table rttest (id int identity primary key, i int null, c
char(5) null);
insert into rttest (i) values (1);
(1 row affected)
select * from rttest;
id i c
----------- ----------- -----
1 1 NULL
select * from rttest where c=null;
id i
c
----------- ----------- -----
1 1 NULL
(1 row affected)
select * from rttest where c is null;
id i
c
----------- ----------- -----
1 1 NULL
(1 row affected)
> set ansinull on;
select * from rttest where c=null;
id i
c
----------- ----------- -----
(0 rows affected)
select * from rttest where c is null;
id i
c
----------- ----------- -----
1 1 NULL
So I understand that the SybaseASEDialect converts the HQL to is not null or != null
depending on ansinull.
But why does it add ADDITIONAL null checks when the parameter is false? How can I write
“select * from table where column = null” with ansinull=false in HQL?
(
https://hibernate.atlassian.net/browse/HHH-16216#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16216#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100217- sha1:65be9f2 )