I have the following problem:

In my persistent class I have collection field of type DList.

When I remove objects from it, tables OJB_DLIST and OJB_DLIST_ENTRY
are updated correctly, that is references to removed objects are
deleted.

Rows from data table are not removed - that is correct too.

But when I retrive main object, somehow OJB_DLIST and OJB_DLIST_ENTRY
tables are not taken into account and I get all of entries including
removed ones.

I use following code to retrieve object:

    Implementation odmg=Utility.getImplementation();
    Database db=Utility.getDatabase();
    org.odmg.Transaction transaction=Utility.getImplementation().newTransaction();
    
    transaction.begin();

    PersistenceBroker pb=((TransactionImpl) transaction).getBroker();
    
    Criteria criteria=new Criteria();
    criteria.addEqualTo("login",login);
    Query query = new QueryByCriteria(Webmaster.class,criteria);
    Collection wms = pb.getCollectionByQuery(query);
    transaction.commit();

I also tried to use OQL:
    Implementation odmg=Utility.getImplementation();
    Database db=Utility.getDatabase();
    org.odmg.Transaction transaction=Utility.getImplementation().newTransaction();
    
    transaction.begin();

    PersistenceBroker pb=((TransactionImpl) transaction).getBroker();
    OQLQuery query = odmg.newOQLQuery();

    query.create("select wms from " + Webmaster.class.getName()+" where 
login='"+login+"'");
    
    DList wms = (DList) query.execute();

    transaction.commit();

But I keep getting
java.lang.AbstractMethodError: org.apache.ojb.odmg.OJB.newOQLQuery()Lorg/odmg/OQLQuery;

Can figure out why?..


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to