Remove org.hibernate.query.procedure.ProcedureParameter#enablePassingNulls and #isPassNullsEnabled

Description

These will now be handled implicitly based on whether #setParameter was called for that parameter (not called versus called passing a NULL):

  • #setParameter called passing NULL -> We will bind the null to the JDBC CallableStatement

  • #setParameter not called -> We will not bind any value to the JDBC CallableStatement.

The later case allows for procedure argument default values to kick in.

Environment

None

Activity

Show:
Steve Ebersole
February 2, 2017, 3:15 PM

- From a user perspective, what are your thoughts on dropping ProcedureParameter#enablePassingNulls (just rely on the #setParameter triggers I mention) versus still exposing it as an alternative means of indicating this?

Vlad Mihalcea
February 2, 2017, 3:27 PM

I think it's better if the call fails if the user didn't supply all parameters, even if some of them are NULL. So, all parameters (NULL included) should be passed explicitly. Maybe we should ask this on the mailing list to see if there's anyone having a different idea.

Steve Ebersole
February 2, 2017, 3:41 PM

FWIW what I propose is consistent with what most JDBC drivers do; not sure if this behavior is required specifically. In order for a argument default on a procedure to be applied it must not be referenced. It is similar to DEFAULT values on columns.

Assignee

Unassigned

Reporter

Steve Ebersole

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Priority

Major
Configure