Correct reference to executeAndReturnKey method

Issue: SPR-12639
This commit is contained in:
Juergen Hoeller
2015-02-18 20:46:04 +01:00
parent 3ed24bca20
commit 3f8d48eb1a

View File

@@ -1525,14 +1525,14 @@ TR: Revised, please review.-->For this example, the initializing method is the
// ... additional methods
}</programlisting>The main difference when executing the insert by this second
approach is that you do not add the id to the Map and you call the
<literal>executeReturningKey</literal> method. This returns a
<literal>executeAndReturnKey</literal> method. This returns a
<literal>java.lang.Number</literal> object with which you can create an
instance of the numerical type that is used in our domain class.You
cannot rely on all databases to return a specific Java class here;
<literal>java.lang.Number</literal> is the base class that you can rely
on. If you have multiple auto-generated columns, or the generated values
are non-numeric, then you can use a <literal>KeyHolder</literal> that is
returned from the <literal>executeReturningKeyHolder</literal>
returned from the <literal>executeAndReturnKeyHolder</literal>
method.</para>
</section>