[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2271) HbmBinder.getResultCheckStyle ignore callables sql-XXX (sql-update, sql-delete, etc)
German de la Cruz (JIRA)
noreply at atlassian.com
Wed Nov 29 11:31:04 EST 2006
HbmBinder.getResultCheckStyle ignore callables sql-XXX (sql-update, sql-delete, etc)
------------------------------------------------------------------------------------
Key: HHH-2271
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2271
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.ga
Reporter: German de la Cruz
Priority: Blocker
the method hbmBinder.getResultCheckStyle doent' take into account the callable parameter
As a result, in a sql-update like this
<sql-update callable="true" >{? = call trader.updateXX(?,?,?,?,?,?,?,?,?,?,?,?)}</sql-update>
Hibernate doen't register the outbound parameter, because in AbstratEntityPersister. update (the one that returns a boolean) it gets a BasicExpectation intead of a BasicParamExpectation, the one who does it.
I think the solution is something like that
private static ExecuteUpdateResultCheckStyle getResultCheckStyle(Element element, boolean callable) throws MappingException {
Attribute attr = element.attribute( "check" );
if ( attr == null ) {
if(callable){
return ExecuteUpdateResultCheckStyle.PARAM;
}
// use COUNT as the default. This mimics the old behavior, although
// NONE might be a better option moving forward in the case of callable
return ExecuteUpdateResultCheckStyle.COUNT;
}
return ExecuteUpdateResultCheckStyle.parse( attr.getValue() );
}
Thanks
--
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
More information about the hibernate-issues
mailing list