openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r462846 - /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
Date Wed, 11 Oct 2006 16:43:19 GMT
Author: awhite
Date: Wed Oct 11 09:43:17 2006
New Revision: 462846

URL: http://svn.apache.org/viewvc?view=rev&rev=462846
Log:
Remove some bad vert inheritance logic.


Modified:
    incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java?view=diff&rev=462846&r1=462845&r2=462846
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
(original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
Wed Oct 11 09:43:17 2006
@@ -2565,19 +2565,9 @@
             // the joins will all be done in the from select
             boolean createJoin = _sel._from == null;
             Table table1 = null;
-            Table table2 = null;
             int alias1 = -1;
             if (createJoin) {
                 table1 = (inverse) ? fk.getPrimaryKeyTable() : fk.getTable();
-                table2 = (inverse) ? fk.getTable() : fk.getPrimaryKeyTable();
-                if (target != null) {
-                    while (target.getTable() != table2) {
-                        target.joinSuperclass(this, false);
-                        target = target.getJoinablePCSuperclassMapping();
-                        if (target == null)
-                            throw new InternalException();
-                    }
-                }
                 alias1 = _sel.getTableIndex(table1, this, true);
             }
 
@@ -2591,6 +2581,8 @@
             _outer = outer;
 
             if (createJoin) {
+                Table table2 = (inverse) ? fk.getTable() 
+                    : fk.getPrimaryKeyTable();
                 int alias2 = _sel.getTableIndex(table2, this, true);
                 Join j = new Join(table1, alias1, table2, alias2, fk, inverse);
                 j.setType((outer) ? Join.TYPE_OUTER : Join.TYPE_INNER);



Mime
View raw message