openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r952244 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ open...
Date Mon, 07 Jun 2010 14:28:34 GMT
Author: curtisr7
Date: Mon Jun  7 14:28:33 2010
New Revision: 952244

URL: http://svn.apache.org/viewvc?rev=952244&view=rev
Log:
OPENJPA-1612: Reverting change 942871 to restore previous behaviour.

Removed:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/InvalidMappingFieldEntity.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/TestMappingRepository.java
Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java
    openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/BlobTest.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java?rev=952244&r1=952243&r2=952244&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java
Mon Jun  7 14:28:33 2010
@@ -883,13 +883,6 @@ public class MappingRepository extends M
 
         // default to blob
         if (installHandlers) {
-            int type = field.getAssociationType();
-            // Having a ONE_TO_ONE, ONE_TO_MANY, MANY_TO_ONE, or MANY_TO_MANY relationship

-            // type as a blob is incorrect
-            if (type >= FieldMetaData.ONE_TO_ONE && type <= FieldMetaData.MANY_TO_MANY)
{
-                throw new UserException(_loc.get("invalid-mapping", field));
-            }
-
             if (getLog().isWarnEnabled())
                 getLog().warn(_loc.get("no-field-strategy", field));
             field.setSerialized(true);

Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties?rev=952244&r1=952243&r2=952244&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
Mon Jun  7 14:28:33 2010
@@ -417,5 +417,4 @@ unique-no-table: A unique constraint on 
 	table "{2}" nor any of its secondary table(s) "{3}".
 bad-version-column-table: One of the version column "{0}" has been associated \
 	with table "{1}", but no primary or secondary table of such name exists.
-version-type-unsupported: Version field "{0}" of {1} is not supported. 
-invalid-mapping: The field "{0}" is an invalid type. Relationship fields must be a valid
Entity type.
+version-type-unsupported: Version field "{0}" of {1} is not supported. 
\ No newline at end of file

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java?rev=952244&r1=952243&r2=952244&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java
Mon Jun  7 14:28:33 2010
@@ -34,7 +34,7 @@ public class ConstantJoinPC4
 
 	@OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
 	private ConstantJoinPC5 oneToOne1;
-	
+	@ManyToMany
 	private Set manyToMany = new HashSet ();
 
 	public ConstantJoinPC4()

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/BlobTest.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/BlobTest.java?rev=952244&r1=952243&r2=952244&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/BlobTest.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/BlobTest.java
Mon Jun  7 14:28:33 2010
@@ -18,14 +18,12 @@
  */
 package org.apache.openjpa.persistence.kernel.common.apps;
 
-import javax.persistence.Basic;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.Lob;
 import javax.persistence.OneToOne;
 
 @Entity
@@ -36,12 +34,13 @@ public class BlobTest {
     private int id;
 
     @Column(name = "blobtab")
-    private byte[] blob;
+    @OneToOne(cascade = { CascadeType.PERSIST, CascadeType.REMOVE })
+    private Object blob;
 
     public BlobTest() {
     }
 
-    public void setBlob(byte[] blob) {
+    public void setBlob(Object blob) {
         this.blob = blob;
     }
 



Mime
View raw message