Question about OJB

From: gbalzola (gbalzola_at_indra.es)
Date: 03/18/04


Date: 18 Mar 2004 03:43:47 -0800

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.