You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Balzola Greño, Gonzalo" <gb...@indra.es> on 2004/03/22 16:02:28 UTC

Is it possible to perform my own sql-queries in OJB?

Hi there:

Using OJB mapping tool I've following problem:

I don´t know in this example how to get the information pointer for
Iterator(iter2) or Collection (col2).

I saw a solution in the db.apache.org FAQ's but it not very clear for
me.


String sql =
        "SELECT A.Artikel_Nr FROM Artikel A, Kategorien PG"
        + " WHERE A.Kategorie_Nr = PG.Kategorie_Nr"
        + " AND PG.Kategorie_Nr = 2";
// get the QueryBySQL
Query q2 = QueryFactory.newQuery(Article.class, sql);

Iterator iter2 = broker.getIteratorByQuery(q2);
// or
Collection col2 = broker.getCollectionByQuery(q2);

Is it possible to perform my own sql-queries in OJB?

Please someone could tell me how to use or give me an example or a
link where I can find further information.

Thanks in advance.

Sorry, but english is not my mother language.
-------------------------------------------------------------------------------------------------------------------
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail

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