Hi *,

which is the recomended way of loading ann object from the repository when
the primary key is known.
 I tried:

        Criteria crit = new Criteria();
        crit.addEqualTo("id", new Long(PERSON_ID));
        Query query = new QueryByCriteria(Person.class, crit);
        Person person = (Person) broker.getObjectByQuery(query);

but it works very slow, 6-8 times slower than in Hibernate: 
        Person person = (Person) session.load(Person.class, new
Long(PERSON_ID)); 

Is there another way for doing this in OJB? 

Thanks,

Florin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to