3) WRT ParameterMode.REF_CURSOR, are those values supposed to be
accessible by calling StoredProcedureQuery#getOutputParameterValue? Or
by calling StoredProcedureQuery#getResultList/getSingleResult? If the
former, do the Classes/ResultSetMappings used to create the
StoredProcedureQuery apply to those ResultSets as well?
On Thu 28 Jun 2012 03:06:09 PM CDT, Steve Ebersole wrote:
> Some more questions/commenst from implementation, this time in regards
> to javax.persistence.StoredProcedureQuery:
>
> 1) StoredProcedureQuery extends Query. Query defines a few methods
> that are questionable being applied to a stored procedure call of any
> sort, namely the paging values for firstResults
> (getFirstResult/setFirstResult) and maxResults
> (getMaxResults/setMaxResults). What is the expectation for those
> calls (mainly the setters I guess) when applied to
> StoredProcedureQuery? Personally I'd like to throw an exception, but
> the javadocs on those Query methods allow only for "@throws
> IllegalArgumentException if the argument is negative"
>
> 2) In regards to named versus positional parameters, I had a few
> questions:
> a) Could we possibly add a restriction that developers should use only
> one form or the other? I see zero benefit to allowing developers to
> mix named and positional parameters in a single query, and in fact see
> only confusion about how those parameters ultimately get merged together.
> b) Given the javadoc statement that named parameters need to be
> registered "in order", I am assuming that their names have no relation
> to the notion of named parameters added to java.sql.CallableStatement
> in Java 7?
>
> Thanks,
> Steve