OPENJPA-20: Clarify return of embedded instances as query result

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@680421 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2008-07-28 17:52:06 +00:00
parent 72b5b4def8
commit 5fc632784f
1 changed files with 7 additions and 1 deletions

View File

@ -65,7 +65,13 @@ an entity by its persistent identity (covered later in this chapter), or use a
An instance of an embeddable class, on the other hand, is only stored as part of An instance of an embeddable class, on the other hand, is only stored as part of
a separate entity. Embeddable instances have no persistent identity, and are a separate entity. Embeddable instances have no persistent identity, and are
never returned directly from the <classname>EntityManager</classname> or from a never returned directly from the <classname>EntityManager</classname> or from a
<classname>Query</classname>. <classname>Query</classname> unless the query uses a projection on owning class
to the embedded instance. For example, if <classname>Address</classname> is
embedded in <classname>Company</classname>, then
a query <classname>"SELECT a FROM Address a"</classname> will never return the
embedded <classname>Address</classname> of <classname>Company</classname>;
but a projection query such as
</classname>"SELECT c.address FROM Company c"</classname> will.
</para> </para>
<para> <para>
Despite these differences, there are few distinctions between entity classes and Despite these differences, there are few distinctions between entity classes and