well, imo it would be better to solve it in PersistenceBrokerImpl#getRsIteratorFromQuery where a query is executed for each extent.
only if the extents sit in the same table ojbconcreteclass is required.
i'm not sure wether a rowreader could solve the problem, it may be too late because the query fails.
hth jakob
Mauricio CASTRO wrote:
Jakob, thank you a lot for your response. I will try to fix it writing my own RowReader. Do you think that's a correct solution?
Thank you, Mauricio Castro.
"Until they become conscious they will never rebel, and until after they
have rebelled they cannot become conscious"
--Orwell 1984
----- Original Message ----- From: "Jakob Braeuchi" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, June 03, 2003 3:29 PM
Subject: Re: possible bug for OQLQuery's and ojbconcreteclass
hi mauricio,have
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
storedthe column ojbConcreteClass and tables that don't have it.
If I extends different classes from resources and only to classes are
tablein the same table and there is another class that is stored in his own
thereI 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
onis no problem.
If you do a Query with a class that involves classes that are stored each
RsIteratorhis 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
RsIteratorof 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
ChainingIteratorof class [class lms.common.LearningUnitImplementation] to
RsIterator[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: Creating RsIterator for class [lms.common.LearningUnitImplementation]
[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: Adding
RsIteratorof 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
ChainingIteratorof class [class workflow.common.WorkspaceImplementation] to
norg.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connectio[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
j.java:505)org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.
at
java:320)org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.
[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
mava:48)org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1State
at
nent.java:153)org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unk
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
nown Source)org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unk
at
nown Source)org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unk
at
nown Source)org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unk
at
wown Source)org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Unkno
at
wn Source)org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unkno
at
wn Source)org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unkno
at
wn Source)org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unkno
at
(n Source)org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery
at
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]
--------------------------------------------------------------------- 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]
