this is a problem in the current implementation. ojb adds the attribute ojbconcreteclass to the query when _building_ the query not
when executing it.
jakob
Mauricio CASTRO wrote:
Hi,
There is a problem when I try to use an OQLQuery that mixes tables that have the column ojbConcreteClass and tables that don't have it.
If I extends different classes from resources and only to classes are stored in the same table and there is another class that is stored in his own table I get the error (Attribute "ojbconcreteclass" not found).
The query might be:
query.create("select all from "+Resource.getName());
If you do a Query with a class that involves classes on the same table there is no problem.
If you do a Query with a class that involves classes that are stored each on his own table there is no problem.
How can I overcome that? Is it really a bug? I am missing something?
Thank you. Mauricio CASTRO.
[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.j ava: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.j ava:48)
at org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1Statem ent.java:153)
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown Source)
at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown Source)
at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unkn own Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unkn own Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unkn own Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unkn own Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Unknow n Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknow n Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknow n Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknow n 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)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
