You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by mi...@apache.org on 2008/09/17 18:19:15 UTC

svn commit: r696360 - in /openjpa/branches/1.2.x/openjpa-project/src/doc/manual: jpa_overview_mapping.xml jpa_overview_query.xml ref_guide_dbsetup.xml ref_guide_pc.xml ref_guide_remote.xml ref_guide_slice.xml supported_databases.xml

Author: mikedd
Date: Wed Sep 17 09:19:15 2008
New Revision: 696360

URL: http://svn.apache.org/viewvc?rev=696360&view=rev
Log:
OPENJPA-724 committing patch provided by Milosz Tylenda. Merging revision 696350 to 1.2.x branch

Modified:
    openjpa/branches/1.2.x/openjpa-project/src/doc/manual/jpa_overview_mapping.xml
    openjpa/branches/1.2.x/openjpa-project/src/doc/manual/jpa_overview_query.xml
    openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml
    openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_pc.xml
    openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_remote.xml
    openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_slice.xml
    openjpa/branches/1.2.x/openjpa-project/src/doc/manual/supported_databases.xml

Modified: openjpa/branches/1.2.x/openjpa-project/src/doc/manual/jpa_overview_mapping.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-project/src/doc/manual/jpa_overview_mapping.xml?rev=696360&r1=696359&r2=696360&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-project/src/doc/manual/jpa_overview_mapping.xml (original)
+++ openjpa/branches/1.2.x/openjpa-project/src/doc/manual/jpa_overview_mapping.xml Wed Sep 17 09:19:15 2008
@@ -4115,6 +4115,7 @@
             <join-table name="MAG_ARTS">
                 <join-column name="MAG_ISBN" referenced-column-name="ISBN"/>
                 <join-column name="MAG_TITLE" referenced-column-name="TITLE"/>
+                <inverse-join-column name="ART_ID" referenced-column-name="ID"/>
             </join-table>
         </one-to-many>
         ...
@@ -4124,12 +4125,15 @@
     <table name="ART"/>
         <attributes>
             <id name="id"/>
-            <many-to-many name="articles">
+            <many-to-many name="authors">
                 <order-by>lastName, firstName</order-by>
                 <join-table name="ART_AUTHS">
                     <join-column name="ART_ID" referenced-column-name="ID"/>
                     <inverse-join-column name="AUTH_ID" referenced-column-name="AID"/>
                 </join-table>
+            <cascade>
+                <cascade-persist/>
+            </cascade>
             </many-to-many>
             ...
        </attributes>
@@ -4170,7 +4174,7 @@
             <itemizedlist>
                 <listitem>
                     <para>
-<literal>Magazine.publisher</literal> and <literal>Company.ags</literal>.
+<literal>Magazine.publisher</literal> and <literal>Company.mags</literal>.
                     </para>
                 </listitem>
                 <listitem>
@@ -4264,9 +4268,9 @@
         ...
         &lt;one-to-many name="items"&gt;
             &lt;map-key name="num"&gt;
-            &lt;join-table name="MAG_ARTS"&gt;
-                &lt;join-column name="MAG_ISBN" referenced-column-name="ISBN"/&gt;
-                &lt;join-column name="MAG_TITLE" referenced-column-name="TITLE"/&gt;
+            &lt;join-table name="SUB_ITEMS" schema="CNTRCT"&gt;
+                &lt;join-column name="SUB_ID"/&gt;
+                &lt;inverse-join-column name="ITEM_ID"/&gt;
             &lt;/join-table&gt;
             &lt;cascade&gt;
                 &lt;cascade-persist/&gt;

Modified: openjpa/branches/1.2.x/openjpa-project/src/doc/manual/jpa_overview_query.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-project/src/doc/manual/jpa_overview_query.xml?rev=696360&r1=696359&r2=696360&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-project/src/doc/manual/jpa_overview_query.xml (original)
+++ openjpa/branches/1.2.x/openjpa-project/src/doc/manual/jpa_overview_query.xml Wed Sep 17 09:19:15 2008
@@ -130,7 +130,7 @@
 member names are not. For example, the expression above could also be expressed
 as:
             </para>
-<programlisting>SELECT x FROM Magazine x WHERE x.title = 'JDJ'</programlisting>
+<programlisting>select x from Magazine x where x.title = 'JDJ'</programlisting>
             <para>
 But it could not be expressed as:
             </para>
@@ -175,18 +175,18 @@
 example:
             </para>
 <programlisting>
-SELECT x FROM Magazine x WHERE (x.price &gt; 3.00 AND x.price &lt;= 5.00) OR x.price = 7.00
+SELECT x FROM Magazine x WHERE (x.price &gt; 3.00 AND x.price &lt;= 5.00) OR x.price &lt; 7.00
 </programlisting>
             <para>
-This expression would match magazines whose price is 4.00, 5.00, or 7.00, but
-not 6.00. Alternately:
+This expression would match magazines whose price is less than 7.00.
+Alternately:
             </para>
 <programlisting>
-SELECT x FROM Magazine x WHERE x.price &gt; 3.00 AND (x.price &lt;= 5.00 OR x.price = 7.00)
+SELECT x FROM Magazine x WHERE x.price &gt; 3.00 AND (x.price &lt;= 5.00 OR x.price &lt; 7.00)
 </programlisting>
             <para>
-This expression will magazines whose price is 5.00 or 7.00, but not 4.00 or
-6.00.
+This expression would match magazines whose price is 4.00, 5.00 or 6.00, but not
+1.00, 2.00 or 3.00.
             </para>
             <para>
 JPQL also includes the following conditionals:
@@ -2247,7 +2247,7 @@
                         <listitem>
                             <para>
 <programlisting>address.phone NOT LIKE '12%3'</programlisting> is false for
-'123' and '12993' and true for '1234' If the value of the string_expression or
+'123' and '12993' and true for '1234'. If the value of the string_expression or
 pattern_value is <literal>NULL</literal> or unknown, the value of the <literal>
 LIKE</literal> expression is unknown. If the escape_character is specified and
 is <literal>NULL</literal>, the value of the <literal>LIKE</literal> expression
@@ -2301,8 +2301,10 @@
                     JPQL Collection Member Expressions
                 </title>
                 <para>
-The use of the comparison collection_member_expression is as follows: syntax for
-the operator <literal>MEMBER OF</literal> in an <itemizedlist><listitem><para>
+The use of the comparison collection_member_expression is as follows:
+                    <itemizedlist>
+                        <listitem>
+                            <para>
 collection_member_expression ::= entity_expression [NOT] MEMBER [OF]
 collection_valued_path_expression
                             </para>
@@ -2331,6 +2333,9 @@
 expression is <literal>NULL</literal> or unknown, the value of the collection
 member expression is unknown.
                 </para>
+                <para>
+The use of the reserved word OF is optional in this expression.
+                </para>
             </section>
             <section id="jpa_langref_exists">
                 <title>
@@ -2346,9 +2351,6 @@
                     </itemizedlist>
                 </para>
                 <para>
-The use of the reserved word OF is optional in this expression.
-                </para>
-                <para>
 Example: <programlisting>SELECT DISTINCT auth FROM Author auth
     WHERE EXISTS
         (SELECT spouseAuthor FROM Author spouseAuthor WHERE spouseAuthor = auth.spouse)
@@ -2802,7 +2804,10 @@
                 <para>
 The argument to an aggregate function may be preceded by the keyword <literal>
 DISTINCT</literal> to specify that duplicate values are to be eliminated before
-the aggregate function is applied. Null values are eliminated before the
+the aggregate function is applied.
+It is legal to specify <literal>DISTINCT</literal> with <literal>MAX</literal>
+or <literal>MIN</literal>, but it does not affect the result.
+Null values are eliminated before the
 aggregate function is applied, regardless of whether the keyword <literal>
 DISTINCT</literal> is specified.
                 </para>
@@ -2813,7 +2818,7 @@
                     <para>
 The following query returns the average price of all magazines:
 <programlisting>SELECT AVG(mag.price) FROM Magazine mag</programlisting> The
-following query returns the sum total cost of all the prices from all the
+following query returns the sum of all the prices from all the
 magazines published by 'Larry': <programlisting>SELECT SUM(mag.price) FROM Publisher pub JOIN pub.magazines mag pub.firstName = 'Larry'
 </programlisting> The following query returns the total number of magazines:
 <programlisting>SELECT COUNT(mag) FROM Magazine mag</programlisting>
@@ -2843,16 +2848,12 @@
                 </itemizedlist>
             </para>
             <para>
-It is legal to specify <literal>DISTINCT</literal> with <literal>MAX</literal>
-or <literal>MIN</literal>, but it does not affect the result.
-            </para>
-            <para>
 When the <literal>ORDER BY</literal> clause is used in a query, each element of
 the <literal>SELECT</literal> clause of the query must be one of the following:
 an identification variable x, optionally denoted as <literal>OBJECT(x)</literal>
 , a single_valued_association_path_expression, or a state_field_path_expression.
 For example: <programlisting>
-SELECT pub FROM Publisher pub JOIN pub.magazines mag ORDER BY o.revenue, o.name
+SELECT pub FROM Publisher pub ORDER BY pub.revenue, pub.name
 </programlisting> If more than one orderby_item is specified, the left-to-right
 sequence of the orderby_item elements determines the precedence, whereby the
 leftmost orderby_item has highest precedence. The keyword <literal>ASC</literal>

Modified: openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml?rev=696360&r1=696359&r2=696360&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml (original)
+++ openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml Wed Sep 17 09:19:15 2008
@@ -3471,7 +3471,7 @@
         </para>
         <para>
 The <link linkend="openjpa.jdbc.DBDictionary"><literal>
-openjpa.jdbc.DBDictionary</literal></link> plugin accepts the the <literal>
+openjpa.jdbc.DBDictionary</literal></link> plugin accepts the <literal>
 JoinSyntax</literal> property to set the system's default syntax. The available
 values are:
         </para>

Modified: openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_pc.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_pc.xml?rev=696360&r1=696359&r2=696360&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_pc.xml (original)
+++ openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_pc.xml Wed Sep 17 09:19:15 2008
@@ -634,9 +634,9 @@
                     Finding an Entity with an Entity Identity Field
                 </title>
 <programlisting>
-public Delivery createDelivery(EntityManager em, Order order) {
+public Delivery createDelivery(Order order) {
     Delivery delivery = new Delivery();
-    delivery.setId(o);
+    delivery.setId(order);
     delivery.setDelivered(new Date());
     return delivery;
 }

Modified: openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_remote.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_remote.xml?rev=696360&r1=696359&r2=696360&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_remote.xml (original)
+++ openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_remote.xml Wed Sep 17 09:19:15 2008
@@ -570,6 +570,15 @@
 To configure a factory to use the JMS provider, your properties might look like
 the following:
                 </para>
+                <example id="ref_guide_event_conf_jmsex">
+                    <title>
+                        JMS Remote Commit Provider Configuration
+                    </title>
+<programlisting>
+&lt;property name="openjpa.RemoteCommitProvider"
+    value="jms(ExceptionReconnectAttempts=5)"/&gt;
+</programlisting>
+                </example>
                 <note>
                     <para>
 Because of the nature of JMS, it is important that you invoke <methodname>
@@ -631,7 +640,7 @@
 <literal>NumBroadcastThreads</literal>: The number of threads to create for the
 purpose of transmitting events to peers. You sould increase this value as the
 number of concurrent transactions increases. The maximum number of concurrent
-transactions is a function of the size of the connection pool. See the the
+transactions is a function of the size of the connection pool. See the
 <literal>MaxActive</literal> property of <literal>
 openjpa.ConnectionFactoryProperties</literal> in
 <xref linkend="ref_guide_dbsetup_builtin"/>. Setting a value of 0 will
@@ -709,6 +718,15 @@
 To transmit persisted object ids in our remote commit events using the JMS
 provider, we modify the previous example as follows:
                 </para>
+                <example id="ref_guide_event_conf_jms2ex">
+                    <title>
+                        JMS Remote Commit Provider transmitting Persisted Object Ids
+                    </title>
+<programlisting>
+&lt;property name="openjpa.RemoteCommitProvider"
+    value="jms(ExceptionReconnectAttempts=5, TransmitPersistedObjectIds=true)"/&gt;
+</programlisting>
+                </example>
             </section>
         </section>
         <section id="ref_guide_event_customization">

Modified: openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_slice.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_slice.xml?rev=696360&r1=696359&r2=696360&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_slice.xml (original)
+++ openjpa/branches/1.2.x/openjpa-project/src/doc/manual/ref_guide_slice.xml Wed Sep 17 09:19:15 2008
@@ -174,13 +174,13 @@
          <section><title>Distributed Transaction</title>
             <para> 
             The database slices participate in a global transaction provided
-            each slice is configured with a XA-complaint JDBC driver, even
+            each slice is configured with a XA-compliant JDBC driver, even
             when the persistence unit is configured for <code>RESOURCE_LOCAL</code>
             transaction.
             </para>
             <para>
             <warning>
-            If any of the configured slices is not XA-complaint <emphasis>and</emphasis> 
+            If any of the configured slices is not XA-compliant <emphasis>and</emphasis> 
             the persistence unit is configured for <code>RESOURCE_LOCAL</code>
             transaction then each slice is committed without any two-phase
             commit protocol. If commit on any slice fails, then atomic nature of
@@ -512,13 +512,13 @@
       or rolls back transaction on individual
       slices using a two-phase commit protocol. The prerequisite to use this scheme
       is, of course, that all the slices must be configured to use
-      XA-complaint JDBC driver. 
+      XA-compliant JDBC driver. 
       </para>
       <para>
       The <code>jndi</code> policy employs a Transaction Manager by looking up the
       JNDI context. The prerequisite to use this transaction
       manager is, of course, that all the slices must be configured to use
-      XA-complaint JDBC driver. 
+      XA-compliant JDBC driver. 
       <warning>This JNDI based policy is not available currently.</warning>
       </para>
     </section>

Modified: openjpa/branches/1.2.x/openjpa-project/src/doc/manual/supported_databases.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-project/src/doc/manual/supported_databases.xml?rev=696360&r1=696359&r2=696360&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-project/src/doc/manual/supported_databases.xml (original)
+++ openjpa/branches/1.2.x/openjpa-project/src/doc/manual/supported_databases.xml Wed Sep 17 09:19:15 2008
@@ -839,7 +839,7 @@
 Oracle has support for "query hints", which are formatted comments embedded in
 SQL that provide some hint for how the query should be executed. These hints are
 usually designed to provide suggestions to the Oracle query optimizer for how to
-efficiently perform a certainly query, and aren't typically needed for any but
+efficiently perform a certain query, and aren't typically needed for any but
 the most intensive queries.
             </para>
             <example id="dbsupport_oracle_query_hints_ex">