|
From: sm (JIRA) <nh...@gm...> - 2011-03-16 07:23:30
|
nhibernate parameters binding order bug
---------------------------------------
Key: NHLQ-100
URL: http://216.121.112.228/browse/NHLQ-100
Project: NHibernate.Linq
Issue Type: Bug
Components: Core
Affects Versions: 1.0.0
Reporter: sm
Priority: Major
I am using latest nhibernate 3, my query:
iqt = rps.Terminals.GetQuery().Where(x => x.NetProtocol.Id == 4);
var res = iqt.OrderBy(x => x.Attributes[124]).ToList();
//ITerminal have IDictionary<long,string>
When i look to the log file i see generated sql:
SELECT terminal0_.ID AS ID4_ ,
terminal0_.ALIAS AS ALIAS4_ ,
terminal0_.TTYPE_ID AS TTYPE3_4_ ,
terminal0_.IP_ADDRESS AS IP4_4_ ,
terminal0_.STREET AS STREET4_ ,
terminal0_.LOCATION AS LOCATION4_ ,
terminal0_.MODEL_ID AS MODEL7_4_ ,
terminal0_.NODE_ID AS NODE8_4_ ,
terminal0_.NETPROTOCOL_ID AS NETPROTO9_4_,
(SELECT (xml_desc(terminal0_.street,'UA'))
FROM terminals
WHERE terminals.id =terminal0_.Id
) AS formula1_,
(SELECT (xml_desc(terminal0_.location,'UA'))
FROM terminals
WHERE terminals.id =terminal0_.Id
) AS formula2_,
(SELECT (xml_desc(terminal_models.description,'EN'))
FROM terminal_models
WHERE terminal_models.id = terminal0_.MODEL_ID
) AS formula3_
FROM TERMINALS terminal0_,
TERM_ATTRIBUTES attributes1_
WHERE terminal0_.ID =attributes1_.TERM_ID
AND attributes1_.ATTR_ID = :p0
AND terminal0_.NETPROTOCOL_ID=:p1 //-> bug here it bind p1 with 124 value but correct p0
ORDER BY attributes1_.VALUE ASC;
:p0 = 4 [Type: Int64 (0)],
:p1 = 124 [Type: Int64 (0)]
I think nhibernate could not correctly resolve parameters bind order with sub selects.
Thanks a lot
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Patrick E. (JIRA) <nh...@gm...> - 2011-03-16 15:16:28
|
[ http://216.121.112.228/browse/NH-2577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Earl moved NHLQ-100 to NH-2577:
---------------------------------------
Component/s: (was: Core)
Linq Provider
Affects Version/s: (was: 1.0.0)
3.1.0
Key: NH-2577 (was: NHLQ-100)
Project: NHibernate (was: NHibernate.Linq)
> nhibernate parameters binding order bug
> ---------------------------------------
>
> Key: NH-2577
> URL: http://216.121.112.228/browse/NH-2577
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.1.0
> Reporter: sm
> Priority: Major
>
> I am using latest nhibernate 3, my query:
> iqt = rps.Terminals.GetQuery().Where(x => x.NetProtocol.Id == 4);
> var res = iqt.OrderBy(x => x.Attributes[124]).ToList();
> //ITerminal have IDictionary<long,string>
> When i look to the log file i see generated sql:
> SELECT terminal0_.ID AS ID4_ ,
> terminal0_.ALIAS AS ALIAS4_ ,
> terminal0_.TTYPE_ID AS TTYPE3_4_ ,
> terminal0_.IP_ADDRESS AS IP4_4_ ,
> terminal0_.STREET AS STREET4_ ,
> terminal0_.LOCATION AS LOCATION4_ ,
> terminal0_.MODEL_ID AS MODEL7_4_ ,
> terminal0_.NODE_ID AS NODE8_4_ ,
> terminal0_.NETPROTOCOL_ID AS NETPROTO9_4_,
> (SELECT (xml_desc(terminal0_.street,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula1_,
> (SELECT (xml_desc(terminal0_.location,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula2_,
> (SELECT (xml_desc(terminal_models.description,'EN'))
> FROM terminal_models
> WHERE terminal_models.id = terminal0_.MODEL_ID
> ) AS formula3_
> FROM TERMINALS terminal0_,
> TERM_ATTRIBUTES attributes1_
> WHERE terminal0_.ID =attributes1_.TERM_ID
> AND attributes1_.ATTR_ID = :p0
> AND terminal0_.NETPROTOCOL_ID=:p1 //-> bug here it bind p1 with 124 value but correct p0
> ORDER BY attributes1_.VALUE ASC;
> :p0 = 4 [Type: Int64 (0)],
> :p1 = 124 [Type: Int64 (0)]
> I think nhibernate could not correctly resolve parameters bind order with sub selects.
> Thanks a lot
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Patrick E. (JIRA) <nh...@gm...> - 2011-03-16 15:21:28
|
[ http://216.121.112.228/browse/NH-2577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Earl updated NH-2577:
-----------------------------
Affects Version/s: (was: 3.1.0)
3.0.0.GA
> nhibernate parameters binding order bug
> ---------------------------------------
>
> Key: NH-2577
> URL: http://216.121.112.228/browse/NH-2577
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.0.0.GA
> Reporter: sm
> Priority: Major
>
> I am using latest nhibernate 3, my query:
> iqt = rps.Terminals.GetQuery().Where(x => x.NetProtocol.Id == 4);
> var res = iqt.OrderBy(x => x.Attributes[124]).ToList();
> //ITerminal have IDictionary<long,string>
> When i look to the log file i see generated sql:
> SELECT terminal0_.ID AS ID4_ ,
> terminal0_.ALIAS AS ALIAS4_ ,
> terminal0_.TTYPE_ID AS TTYPE3_4_ ,
> terminal0_.IP_ADDRESS AS IP4_4_ ,
> terminal0_.STREET AS STREET4_ ,
> terminal0_.LOCATION AS LOCATION4_ ,
> terminal0_.MODEL_ID AS MODEL7_4_ ,
> terminal0_.NODE_ID AS NODE8_4_ ,
> terminal0_.NETPROTOCOL_ID AS NETPROTO9_4_,
> (SELECT (xml_desc(terminal0_.street,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula1_,
> (SELECT (xml_desc(terminal0_.location,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula2_,
> (SELECT (xml_desc(terminal_models.description,'EN'))
> FROM terminal_models
> WHERE terminal_models.id = terminal0_.MODEL_ID
> ) AS formula3_
> FROM TERMINALS terminal0_,
> TERM_ATTRIBUTES attributes1_
> WHERE terminal0_.ID =attributes1_.TERM_ID
> AND attributes1_.ATTR_ID = :p0
> AND terminal0_.NETPROTOCOL_ID=:p1 //-> bug here it bind p1 with 124 value but correct p0
> ORDER BY attributes1_.VALUE ASC;
> :p0 = 4 [Type: Int64 (0)],
> :p1 = 124 [Type: Int64 (0)]
> I think nhibernate could not correctly resolve parameters bind order with sub selects.
> Thanks a lot
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: sm (JIRA) <nh...@gm...> - 2011-03-18 22:51:45
|
[ http://216.121.112.228/browse/NH-2577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20674#action_20674 ]
sm commented on NH-2577:
------------------------
Is there any chanse this bug will be fixed in next release or by patch? And how long to wait for it. Thanks a lot
> nhibernate parameters binding order bug
> ---------------------------------------
>
> Key: NH-2577
> URL: http://216.121.112.228/browse/NH-2577
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.0.0.GA
> Reporter: sm
> Priority: Major
>
> I am using latest nhibernate 3, my query:
> iqt = rps.Terminals.GetQuery().Where(x => x.NetProtocol.Id == 4);
> var res = iqt.OrderBy(x => x.Attributes[124]).ToList();
> //ITerminal have IDictionary<long,string>
> When i look to the log file i see generated sql:
> SELECT terminal0_.ID AS ID4_ ,
> terminal0_.ALIAS AS ALIAS4_ ,
> terminal0_.TTYPE_ID AS TTYPE3_4_ ,
> terminal0_.IP_ADDRESS AS IP4_4_ ,
> terminal0_.STREET AS STREET4_ ,
> terminal0_.LOCATION AS LOCATION4_ ,
> terminal0_.MODEL_ID AS MODEL7_4_ ,
> terminal0_.NODE_ID AS NODE8_4_ ,
> terminal0_.NETPROTOCOL_ID AS NETPROTO9_4_,
> (SELECT (xml_desc(terminal0_.street,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula1_,
> (SELECT (xml_desc(terminal0_.location,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula2_,
> (SELECT (xml_desc(terminal_models.description,'EN'))
> FROM terminal_models
> WHERE terminal_models.id = terminal0_.MODEL_ID
> ) AS formula3_
> FROM TERMINALS terminal0_,
> TERM_ATTRIBUTES attributes1_
> WHERE terminal0_.ID =attributes1_.TERM_ID
> AND attributes1_.ATTR_ID = :p0
> AND terminal0_.NETPROTOCOL_ID=:p1 //-> bug here it bind p1 with 124 value but correct p0
> ORDER BY attributes1_.VALUE ASC;
> :p0 = 4 [Type: Int64 (0)],
> :p1 = 124 [Type: Int64 (0)]
> I think nhibernate could not correctly resolve parameters bind order with sub selects.
> Thanks a lot
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Patrick E. (JIRA) <nh...@gm...> - 2011-03-18 22:55:58
|
[ http://216.121.112.228/browse/NH-2577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20675#action_20675 ]
Patrick Earl commented on NH-2577:
----------------------------------
While I can't say when we'll have time to get around to this, you can definitely accelerate the process a great deal by providing a good failing test case. See the JIRA welcome page for details on how to create a test case.
> nhibernate parameters binding order bug
> ---------------------------------------
>
> Key: NH-2577
> URL: http://216.121.112.228/browse/NH-2577
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.0.0.GA
> Reporter: sm
> Priority: Major
>
> I am using latest nhibernate 3, my query:
> iqt = rps.Terminals.GetQuery().Where(x => x.NetProtocol.Id == 4);
> var res = iqt.OrderBy(x => x.Attributes[124]).ToList();
> //ITerminal have IDictionary<long,string>
> When i look to the log file i see generated sql:
> SELECT terminal0_.ID AS ID4_ ,
> terminal0_.ALIAS AS ALIAS4_ ,
> terminal0_.TTYPE_ID AS TTYPE3_4_ ,
> terminal0_.IP_ADDRESS AS IP4_4_ ,
> terminal0_.STREET AS STREET4_ ,
> terminal0_.LOCATION AS LOCATION4_ ,
> terminal0_.MODEL_ID AS MODEL7_4_ ,
> terminal0_.NODE_ID AS NODE8_4_ ,
> terminal0_.NETPROTOCOL_ID AS NETPROTO9_4_,
> (SELECT (xml_desc(terminal0_.street,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula1_,
> (SELECT (xml_desc(terminal0_.location,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula2_,
> (SELECT (xml_desc(terminal_models.description,'EN'))
> FROM terminal_models
> WHERE terminal_models.id = terminal0_.MODEL_ID
> ) AS formula3_
> FROM TERMINALS terminal0_,
> TERM_ATTRIBUTES attributes1_
> WHERE terminal0_.ID =attributes1_.TERM_ID
> AND attributes1_.ATTR_ID = :p0
> AND terminal0_.NETPROTOCOL_ID=:p1 //-> bug here it bind p1 with 124 value but correct p0
> ORDER BY attributes1_.VALUE ASC;
> :p0 = 4 [Type: Int64 (0)],
> :p1 = 124 [Type: Int64 (0)]
> I think nhibernate could not correctly resolve parameters bind order with sub selects.
> Thanks a lot
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Patrick E. (JIRA) <nh...@gm...> - 2011-04-22 14:58:48
|
[ http://216.121.112.228/browse/NH-2577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20935#action_20935 ]
Patrick Earl commented on NH-2577:
----------------------------------
There are a lot of votes on this issue, can somebody provide a test case?
> nhibernate parameters binding order bug
> ---------------------------------------
>
> Key: NH-2577
> URL: http://216.121.112.228/browse/NH-2577
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.0.0.GA
> Reporter: sm
> Priority: Major
>
> I am using latest nhibernate 3, my query:
> iqt = rps.Terminals.GetQuery().Where(x => x.NetProtocol.Id == 4);
> var res = iqt.OrderBy(x => x.Attributes[124]).ToList();
> //ITerminal have IDictionary<long,string>
> When i look to the log file i see generated sql:
> SELECT terminal0_.ID AS ID4_ ,
> terminal0_.ALIAS AS ALIAS4_ ,
> terminal0_.TTYPE_ID AS TTYPE3_4_ ,
> terminal0_.IP_ADDRESS AS IP4_4_ ,
> terminal0_.STREET AS STREET4_ ,
> terminal0_.LOCATION AS LOCATION4_ ,
> terminal0_.MODEL_ID AS MODEL7_4_ ,
> terminal0_.NODE_ID AS NODE8_4_ ,
> terminal0_.NETPROTOCOL_ID AS NETPROTO9_4_,
> (SELECT (xml_desc(terminal0_.street,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula1_,
> (SELECT (xml_desc(terminal0_.location,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula2_,
> (SELECT (xml_desc(terminal_models.description,'EN'))
> FROM terminal_models
> WHERE terminal_models.id = terminal0_.MODEL_ID
> ) AS formula3_
> FROM TERMINALS terminal0_,
> TERM_ATTRIBUTES attributes1_
> WHERE terminal0_.ID =attributes1_.TERM_ID
> AND attributes1_.ATTR_ID = :p0
> AND terminal0_.NETPROTOCOL_ID=:p1 //-> bug here it bind p1 with 124 value but correct p0
> ORDER BY attributes1_.VALUE ASC;
> :p0 = 4 [Type: Int64 (0)],
> :p1 = 124 [Type: Int64 (0)]
> I think nhibernate could not correctly resolve parameters bind order with sub selects.
> Thanks a lot
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-03 11:26:02
|
[ http://216.121.112.228/browse/NH-2577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20989#action_20989 ]
Fabio Maulo commented on NH-2577:
---------------------------------
Many people came to the party but no Martini.
No Martini, no party.
> nhibernate parameters binding order bug
> ---------------------------------------
>
> Key: NH-2577
> URL: http://216.121.112.228/browse/NH-2577
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.0.0.GA
> Reporter: sm
> Priority: Major
>
> I am using latest nhibernate 3, my query:
> iqt = rps.Terminals.GetQuery().Where(x => x.NetProtocol.Id == 4);
> var res = iqt.OrderBy(x => x.Attributes[124]).ToList();
> //ITerminal have IDictionary<long,string>
> When i look to the log file i see generated sql:
> SELECT terminal0_.ID AS ID4_ ,
> terminal0_.ALIAS AS ALIAS4_ ,
> terminal0_.TTYPE_ID AS TTYPE3_4_ ,
> terminal0_.IP_ADDRESS AS IP4_4_ ,
> terminal0_.STREET AS STREET4_ ,
> terminal0_.LOCATION AS LOCATION4_ ,
> terminal0_.MODEL_ID AS MODEL7_4_ ,
> terminal0_.NODE_ID AS NODE8_4_ ,
> terminal0_.NETPROTOCOL_ID AS NETPROTO9_4_,
> (SELECT (xml_desc(terminal0_.street,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula1_,
> (SELECT (xml_desc(terminal0_.location,'UA'))
> FROM terminals
> WHERE terminals.id =terminal0_.Id
> ) AS formula2_,
> (SELECT (xml_desc(terminal_models.description,'EN'))
> FROM terminal_models
> WHERE terminal_models.id = terminal0_.MODEL_ID
> ) AS formula3_
> FROM TERMINALS terminal0_,
> TERM_ATTRIBUTES attributes1_
> WHERE terminal0_.ID =attributes1_.TERM_ID
> AND attributes1_.ATTR_ID = :p0
> AND terminal0_.NETPROTOCOL_ID=:p1 //-> bug here it bind p1 with 124 value but correct p0
> ORDER BY attributes1_.VALUE ASC;
> :p0 = 4 [Type: Int64 (0)],
> :p1 = 124 [Type: Int64 (0)]
> I think nhibernate could not correctly resolve parameters bind order with sub selects.
> Thanks a lot
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|