db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauricio Castro <mcast...@hotmail.com>
Subject [OJB] Issue #OJB179 - Queries fail if you mix objects persisted in their own table...
Date Fri, 13 Jun 2003 00:55:22 GMT
You can view the issue detail at the following URL:
<http://scarab.werken.com/scarab/issues/id/OJB179>

Type :        Defect
Issue Id :    OJB179
Reported by: Mauricio Castro
             mcastroe - (mcastroe@hotmail.com)

Details:

Platform: All
Operating system: windows 2000
Summary: Queries fail if you mix objects persisted in their own tables with objects that use
ojbConcreteClass
Description:    <class-descriptor class="A">
      <extent-class class-ref="E" />
      <extent-class class-ref="F" />
   </class-descriptor>

    <class-descriptor class="E">
       <extent-class class-ref="EImplementation" />
       <extent-class class-ref="G" />
    </class-descriptor>

    <class-descriptor class="G">
       <extent-class class-ref="GImplementation" />
    </class-descriptor>

Suppose that F is mapped to his own table. GImplementation and EImplementation are mapped
to the same table using the "special attribute ojbConcreteClass". OJB works perfectly for
updates/deletes.

The main problem is that OJB fails if you query for all the objects of class type A.

[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: Adding RsIterator of class [interface
lms.common.LearningUnit] to ChainingIterator
[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: Creating ChainingIterator for class
[lms.common.LearningUnit]
[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: Adding RsIterator of class [class
lms.common.LearningUnitImplementation] to ChainingIterator
[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: Creating RsIterator for class [lms.common.LearningUnitImplementation]
[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: Adding RsIterator of class [interface
workflow.common.Workspace] to ChainingIterator
[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: Creating ChainingIterator for class
[workflow.common.Workspace]
[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: Adding RsIterator of class [class
workflow.common.WorkspaceImplementation] to ChainingIterator
[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: Creating RsIterator for class [workflow.common.WorkspaceImplementation]
java.sql.SQLException: ERROR:  Attribute "ojbconcreteclass" not found
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:505)
at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:320)
[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException
during the execution of the query (for a workflow.common.WorkspaceImplementation): ERROR:
 Attribute "ojbconcreteclass" not found
ERROR:  Attribute "ojbconcreteclass" not found
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48)
at org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1Statement.java:153)
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(UnknownSource)
at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown Source)
at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(UnknownSource)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.odmg.oql.OQLQueryImpl.execute(Unknown Source)
at workflow.manager.WorkflowManager.printAll(WorkflowManager.java:270)
at workflow.manager.WorkflowManager.main(WorkflowManager.java:354)
Status: New
Severity: Normal


Mime
View raw message