jsr338-experts@jpa-spec.java.net

[jsr338-experts] StoredProcedure clarification

From: Steve Ebersole <steve.ebersole_at_redhat.com>
Date: Fri, 26 Jul 2013 17:16:44 -0500

EntityManager em = ...;
StoredProcedureQuery query = em.createStoredProcedureQuery(...);
query.getUpdateCount();

What should happen above when getUpdateCount() is called? The "result"
corollaries (getResultList, getSingleResult) specifically say that the
query will be executed when they are called. getUpdateCount
conspicuously says nothing on the subject. Nor does it call out being
allowed to throw an exception in this case. So should I assume that
getUpdateCount() should just return -1 here?

Yes, its a silly case, but the TCK does it. Many times...