db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armin Waibel (JIRA)" <j...@apache.org>
Subject [jira] Created: (OJB-94) NPE when execute query (join via 1:n reference) on objects using "table-per-subclass"-inheritance
Date Fri, 03 Feb 2006 00:07:03 GMT
NPE when execute  query (join via 1:n reference) on objects using "table-per-subclass"-inheritance

---------------------------------------------------------------------------------------------------

         Key: OJB-94
         URL: http://issues.apache.org/jira/browse/OJB-94
     Project: OJB
        Type: Bug
    Versions: 1.0.4    
    Reporter: Armin Waibel


The NPE is caused by SqlQueryStatement.buildSuperJoinTree

Criteria crit = new Criteria()
        .addEqualTo("name", consortium.getName())
        .addEqualTo("managers.executives.address", name + "_street_12")
        .addEqualTo("managers.name", name + "_Manager");
Query q = QueryFactory.newQuery(Consortium.class, crit);

Caused by: java.lang.NullPointerException
	at org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.buildSuperJoinTree(SqlQueryStatement.java:1798)
	at org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.getTableAlias(SqlQueryStatement.java:1210)
	at org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.buildJoinTreeForColumn(SqlQueryStatement.java:1774)
	at org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.buildJoinTree(SqlQueryStatement.java:1751)
	at org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.splitCriteria(SqlQueryStatement.java:1855)
	at org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.<init>(SqlQueryStatement.java:154)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message