From: <no...@at...> - 2005-07-05 15:22:48
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-708 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-708 Summary: Restrictions.in could not be used properly on composite-ids Type: Bug Status: Unassigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.5 Assignee: Reporter: Holger Bartnick Created: Tue, 5 Jul 2005 10:22 AM Updated: Tue, 5 Jul 2005 10:22 AM Environment: Oracle 9i, org.hibernate.criterion.InExpression Description: Restrictions.in could not be used properly on composite-ids for a composite-id with the attributes key and station the resulting sql is like: [where key in (?,?...) and station in (?,?...)] it should result in an sql like: [where (key, station) in ((?,?),(?,?)...)] otherwise the result would be a scalar product example: key station 1 1 2 1 2 2 3 2 [where key in (1,2,3) and station in (1,2)] would return all values [where (key, station) in ((1,1),(2,1),(3,2))] would omit the record (2,2) --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-07-19 23:28:38
|
Message: The following issue has been closed. Resolver: Gavin King Date: Tue, 19 Jul 2005 6:26 PM Thanks, fixed. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-708 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-708 Summary: Restrictions.in could not be used properly on composite-ids Type: Bug Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Fix Fors: 3.1 beta Versions: 3.0.5 Assignee: Reporter: Holger Bartnick Created: Tue, 5 Jul 2005 10:22 AM Updated: Tue, 19 Jul 2005 6:26 PM Environment: Oracle 9i, org.hibernate.criterion.InExpression Description: Restrictions.in could not be used properly on composite-ids for a composite-id with the attributes key and station the resulting sql is like: [where key in (?,?...) and station in (?,?...)] it should result in an sql like: [where (key, station) in ((?,?),(?,?)...)] otherwise the result would be a scalar product example: key station 1 1 2 1 2 2 3 2 [where key in (1,2,3) and station in (1,2)] would return all values [where (key, station) in ((1,1),(2,1),(3,2))] would omit the record (2,2) --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: Holger B. (JIRA) <no...@at...> - 2006-01-25 01:12:17
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-708?pag= e=3Dcomments#action_21774 ]=20 Holger Bartnick commented on HHH-708: ------------------------------------- it doesn=C2=B4t work in HHH 3.11 anymore The InExpression produces a statement like [where (key, station) in ((?,?),= (?,?)...)] indeed. but the parameter binding is wrong: instead of binding first key to parameter 1 and first station to parameter = 2 it binds first key to parameter 1 and first KEY to parameter 2 etc. at the half of the parameterlist it changes to first station etc. thought it was fixed in 3.1 beta?!? > Restrictions.in could not be used properly on composite-ids > ----------------------------------------------------------- > > Key: HHH-708 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= HH-708 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.0.5 > Environment: Oracle 9i, org.hibernate.criterion.InExpression > Reporter: Holger Bartnick > Fix For: 3.1 beta 1 > > > Restrictions.in could not be used properly on composite-ids > for a composite-id with the attributes key and station > the resulting sql is like:=20 > [where key in (?,?...) and station in (?,?...)] > it should result in an sql like:=20 > [where (key, station) in ((?,?),(?,?)...)] > otherwise the result would be a scalar product=20 > example: > key station > 1 1 > 2 1 > 2 2 > 3 2 > [where key in (1,2,3) and station in (1,2)] > would return all values > [where (key, station) in ((1,1),(2,1),(3,2))] > would omit the record (2,2) --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Viatcheslav (JIRA) <no...@at...> - 2006-05-11 11:23:23
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-708?page=comments#action_23079 ] Viatcheslav commented on HHH-708: --------------------------------- Agree, have this issue too. As quick shot the loop order in org.hibernate.criterion.InExpression::getTypedValues is wrong instead of for ( int i=0; i<types.length; i++ ) { for ( int j=0; j<values.length; j++ ) { Object subval = values[j]==null ? null : actype.getPropertyValues( values[j], EntityMode.POJO )[i]; list.add( new TypedValue( types[i], subval, EntityMode.POJO ) ); } } it should be for ( int j=0; j<values.length; j++ ) { for ( int i=0; i<types.length; i++ ) { Object subval = values[j]==null ? null : actype.getPropertyValues( values[j], EntityMode.POJO )[i]; list.add( new TypedValue( types[i], subval, EntityMode.POJO ) ); } } After change have worked for me. This bug is marked as closed, maybe new one should be opened or this reopened, otherwise I'm afraid the developers will not see the issue. > Restrictions.in could not be used properly on composite-ids > ----------------------------------------------------------- > > Key: HHH-708 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-708 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.0.5 > Environment: Oracle 9i, org.hibernate.criterion.InExpression > Reporter: Holger Bartnick > Fix For: 3.1 beta 1 > > > Restrictions.in could not be used properly on composite-ids > for a composite-id with the attributes key and station > the resulting sql is like: > [where key in (?,?...) and station in (?,?...)] > it should result in an sql like: > [where (key, station) in ((?,?),(?,?)...)] > otherwise the result would be a scalar product > example: > key station > 1 1 > 2 1 > 2 2 > 3 2 > [where key in (1,2,3) and station in (1,2)] > would return all values > [where (key, station) in ((1,1),(2,1),(3,2))] > would omit the record (2,2) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-11 11:27:10
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-708?page=comments#action_23080 ] Max Rydahl Andersen commented on HHH-708: ----------------------------------------- open a new issue and add a *patch* and a test that show it fails. > Restrictions.in could not be used properly on composite-ids > ----------------------------------------------------------- > > Key: HHH-708 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-708 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.0.5 > Environment: Oracle 9i, org.hibernate.criterion.InExpression > Reporter: Holger Bartnick > Fix For: 3.1 beta 1 > > > Restrictions.in could not be used properly on composite-ids > for a composite-id with the attributes key and station > the resulting sql is like: > [where key in (?,?...) and station in (?,?...)] > it should result in an sql like: > [where (key, station) in ((?,?),(?,?)...)] > otherwise the result would be a scalar product > example: > key station > 1 1 > 2 1 > 2 2 > 3 2 > [where key in (1,2,3) and station in (1,2)] > would return all values > [where (key, station) in ((1,1),(2,1),(3,2))] > would omit the record (2,2) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |