OPENJPA-1327 JPQL Query Doc update

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@826738 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Catalina Wei 2009-10-19 18:01:40 +00:00
parent 737f17fc26
commit 58ebc6d9f1
2 changed files with 16 additions and 3 deletions

View File

@ -3865,14 +3865,27 @@ If an entity class name is specified in the <literal>SELECT NEW</literal>
clause, the resulting entity instances are in the new state.
</para>
<para>
If a single_valued_path_expression or identification_variable that is an argument to the constructor
references an entity, the resulting entity instance will be in the managed state.
If a <literal>single_valued_path_expression</literal> or
<literal>identification_variable</literal> that is an argument to the constructor
references an entity, the resulting entity instance referenced by that
<literal>single_valued_path_expression</literal> or
<literal>identification_variable</literal>
will be in the managed state.
</para>
<para>
If <literal>PublisherInfo</literal> is an entity class, the following 2 queries return
instances of <literal>PublisherInfo</literal> that will be in the new state.
In the second example, <literal>mag</literal> is an <literal>identification_variable</literal>
passed as an argument to the constructor <literal>PublisherInfo(Magazine mag)</literal>;
the entity instances of <literal>Magazine</literal> created during query evaluation
will be in the managed state.
Example:
</para>
<programlisting>SELECT NEW com.company.PublisherInfo(pub.id, pub.revenue, mag.price)
FROM Publisher pub JOIN pub.magazines mag WHERE mag.price &gt; 5.00
</programlisting>
<programlisting>SELECT NEW com.company.PublisherInfo(mag)
FROM Publisher pub JOIN pub.magazines mag WHERE mag.price &gt; 5.00
</programlisting>
</section>
<section id="jpa_langref_null_select">

View File

@ -176,7 +176,7 @@ as follows:
</example>
<para>
The distribution policy is configured by a full-qualified class name that implements
<literal>org.apache.openjpa.datacahe.CacheDistributionPolicy</lietral>. The partitions
<literal>org.apache.openjpa.datacahe.CacheDistributionPolicy</literal>. The partitions
are specified as value of <literal>partitions</literal> attribute as a series of
individually configurable plug-in strings. As the example shows, i) each partition plug-in configuration
must be enclosed in parentheses, ii) must be separated by comma and iii) the complete