Author: mikedd
Date: Thu Apr 29 18:54:40 2010
New Revision: 939451

URL: http://svn.apache.org/viewvc?rev=939451&view=rev
Log:
Update manual on difference between nullable=false and optional=false

Modified:
    
openjpa/branches/1.3.x/openjpa-project/src/doc/manual/jpa_overview_mapping.xml
    openjpa/branches/1.3.x/openjpa-project/src/doc/manual/jpa_overview_meta.xml

Modified: 
openjpa/branches/1.3.x/openjpa-project/src/doc/manual/jpa_overview_mapping.xml
URL: 
http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-project/src/doc/manual/jpa_overview_mapping.xml?rev=939451&r1=939450&r2=939451&view=diff
==============================================================================
--- 
openjpa/branches/1.3.x/openjpa-project/src/doc/manual/jpa_overview_mapping.xml 
(original)
+++ 
openjpa/branches/1.3.x/openjpa-project/src/doc/manual/jpa_overview_mapping.xml 
Thu Apr 29 18:54:40 2010
@@ -99,6 +99,14 @@ JPA uses the defaults defined by the spe
 each mapping throughout this chapter, we also describe the defaults that apply
 when the mapping is absent.
     </para>
+    <note>
+        <para>
+Mapping metadata is used primarily with schema generation. This metadata 
should not
+be relied upon for validation prior to communicating with the database. 
+For example using the @Column(nullable=false) annotation does not do up front 
validation
+that the value in the entity is correct. 
+        </para>
+    </note>
     <section id="jpa_overview_mapping_table">
         <title>
             Table

Modified: 
openjpa/branches/1.3.x/openjpa-project/src/doc/manual/jpa_overview_meta.xml
URL: 
http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-project/src/doc/manual/jpa_overview_meta.xml?rev=939451&r1=939450&r2=939451&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-project/src/doc/manual/jpa_overview_meta.xml 
(original)
+++ openjpa/branches/1.3.x/openjpa-project/src/doc/manual/jpa_overview_meta.xml 
Thu Apr 29 18:54:40 2010
@@ -107,6 +107,15 @@ in the Reference Guide for details. Ther
 these extension annotations.
         </para>
     </note>
+    <note>
+        <para>
+Persistence metadata may be used to validate the contents of your entities 
prior to communicating
+with the database. This differs from mapping meta data which is primarily used 
for schema generation.
+For example if you indicate that a relationship is not optional (e.g. 
@Basic(optional=false)) OpenJPA
+will validate that the variable in your entity is not null 
<emphasis>before</emphasis> inserting a row 
+in the database. 
+        </para>
+    </note>
     <mediaobject>
         <imageobject>
             <!-- PNG image data, 553 x 580 (see README) -->


Reply via email to