From 5fc632784f03b31ba961b2ee549f0f1ef5bc0d96 Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Mon, 28 Jul 2008 17:52:06 +0000 Subject: [PATCH] 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 --- openjpa-project/src/doc/manual/jpa_overview_pc.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openjpa-project/src/doc/manual/jpa_overview_pc.xml b/openjpa-project/src/doc/manual/jpa_overview_pc.xml index 23ceea1ff..9f50f9c5e 100644 --- a/openjpa-project/src/doc/manual/jpa_overview_pc.xml +++ b/openjpa-project/src/doc/manual/jpa_overview_pc.xml @@ -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 a separate entity. Embeddable instances have no persistent identity, and are never returned directly from the EntityManager or from a -Query. +Query unless the query uses a projection on owning class +to the embedded instance. For example, if Address is +embedded in Company, then +a query "SELECT a FROM Address a" will never return the +embedded Address of Company; +but a projection query such as +"SELECT c.address FROM Company c" will. Despite these differences, there are few distinctions between entity classes and