Skip to main content

[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

  • From: Linda DeMichiel <linda.demichiel@...>
  • To: jsr338-experts@...
  • Subject: [jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification
  • Date: Tue, 06 Aug 2013 12:36:50 -0700
  • List-id: <jsr338-experts.jpa-spec.java.net>
  • Organization: Oracle Corporation

Catching up on my email here (after a much-needed vacation), so please excuse 
the
delay in response....

On 7/26/2013 3:16 PM, Steve Ebersole wrote:
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.  This is covered in section 3.10.17.3 of the spec.  For some reason the
relevant statement didn't make it into the javadocs as with getResultList and
getSingleResult (although the spec version has it).   I will track this as
an errata item.

-Linda

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




[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

Steve Ebersole 08/02/2013

<Possible follow-up(s)>

[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

gordon yorke 08/06/2013

[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

Linda DeMichiel 08/06/2013

[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

Kevin Sutter 08/06/2013

[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

Linda DeMichiel 08/06/2013

[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

Kevin Sutter 08/06/2013

[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

Steve Ebersole 08/12/2013

[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

Linda DeMichiel 08/06/2013

[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

gordon yorke 08/06/2013

[jpa-spec users] [jsr338-experts] Re: StoredProcedure clarification

gordon yorke 08/06/2013
 
 
Close
loading
Please Confirm
Close