On 6/28/2012 1:06 PM, 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"
>
I think these calls should work.
> 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.
The spec covers this in 3.9.12.
> 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?
>
The named parameters correspond to the parameter names of the stored procedure. I think the "in order" is in
error and will remove.
> Thanks,
> Steve