[Hibernate-JIRA] Created: (HHH-3596) Wrong way of finding accessor methods of a property
by Raimar Falke (JIRA)
Wrong way of finding accessor methods of a property
---------------------------------------------------
Key: HHH-3596
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3596
Project: Hibernate Core
Issue Type: Bug
Components: core
Environment: Actual problem with 3.2.1
But current source code (http://viewvc.jboss.org/cgi-bin/viewvc.cgi/hibernate/core/trunk/core/src/...) works in a similar way.
Reporter: Raimar Falke
Priority: Minor
org.hibernate.property.BasicPropertyAccessor.createGetter uses
the direction (accessor method name -> property name) for finding
the accessor methods for a given property.
This causes problems with properties which have a name like
"xCoord" (first letter lowercase, second uppercase, rest doesn't
matter). The accessor methods in the source code will be
getXCoord and setXCoord.
Because of the way BasicPropertyAccessor.getterMethod is
implemented the method getXCoord is not found. The reason
is the special case for decapitalizing accessor names. So
getXCoord will become XCoord after the substring
and will stay XCoord after decapitalizing. This doesn't match the
property name. And so no method is found resulting in an exception:
org.hibernate.PropertyNotFoundException: Could not find a getter for xCoord ...
Better is the other direction (property name -> accessor
method name) with a final method lookup.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 1 month
[Hibernate-JIRA] Updated: (HHH-530) Allow application of filters on subqueries
by Heiko Burchard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-530?page=co... ]
Heiko Burchard updated HHH-530:
-------------------------------
Attachment: HqlWithFiltersTest.patch
Hello,
we were using hibernate 3.2.6 with the above patch apllied for a while now. Last week we moved from postgres 8.2 to postgres 8.3 and this revealed a problem with parameter binding on some hql queries. Those queries all have multiple left outer joins, some of them with filters applied. Then hibernate again confuses parameters.
I tried branch 3.3 and branch 3.2, but there is also a problem. With those versions parameters of the mentioned queries get lost somewhere.
I supplied a test that reproduces the errors on 3.2.6 with and without patch and branch 3.2. On branch 3.3 it should work, but i did not yet manage to switch to postgres with the new maven build system...
It looks like hsqldb doesn't care about wrong/missing parameters, so the test will not fail with hsqldb.
Thank you for any comment,
Heiko Burchard
> Allow application of filters on subqueries
> ------------------------------------------
>
> Key: HHH-530
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-530
> Project: Hibernate Core
> Issue Type: Patch
> Components: core
> Reporter: Gavin King
> Assignee: Steve Ebersole
> Fix For: 3.2.x, 3.3.x, 3.4
>
> Attachments: HHH-530.3.3.SP1.patch, HHH-530.3.3.SP1.take2.patch, HHH-530.Additional.Subquery.patch, HHH-530.patch, hibernate_filter_fix-3.0.5.patch, hibernate_filter_fix-3.0.5_14.patch, HqlWithFiltersTest.patch, SubqueriesWithFiltersTest.patch
>
>
> Currently filter conditions are applied in subselects, they should not be.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 1 month