Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-579
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-579
Summary: Patch AbstractQuery so that it supports parameter lists
Type: Improvement
Status: Unassigned
Priority: Minor
Project: Hibernate2
Components:
core
Versions:
2.1
2.0 final
2.1.1
Assignee:
Reporter: Nick Heudecker
Created: Fri, 26 Dec 2003 11:42 AM
Updated: Fri, 26 Dec 2003 11:42 AM
Environment: Any
Description:
Currently, the AbstractQuery class doesn't take into account setting parameter lists when using the 'setProperties(Object)' method. This would be extremely helpful to me. A patch is below.
public Query setProperties(Object bean) throws HibernateException {
Class clazz = bean.getClass();
String[] params = getNamedParameters();
for (int i = 0; i < params.length; i++) {
String namedParam = params[i];
try {
Getter getter = ReflectHelper.getter(clazz, namedParam);
Class retType = getter.getReturnType();
if (retType.isArray() ||
retType instanceof java.util.Collection) {
setParameterList( namedParam, getter.get(bean) );
}
else {
setParameter( namedParam, getter.get(bean),
guessType( getter.getReturnType() ) );
}
}
catch (PropertyNotFoundException pnfe) {
// shouldn't something be logged here....?
}
}
return this;
}
---------------------------------------------------------------------
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
|