I have the following mapping:
Thread <===> Message
1 <===> nI want get the whole set of Messages from Thread reference:
---------------------------------------------------------------------------------
J2SE 1.4.2_04 + OJB 1.0 rc6 + Struts 1.1 + J2EE (just in classpath)
---------------------------------------------------------------------------------
Criteria crit = new Criteria(); crit.addEqualTo("threadId", new Long(threadId)); Query q = QueryFactory.newQuery(ThreadDto.class, crit);
ThreadDto thread = (ThreadDto)broker.getObjectByQuery(q);
Collection ms = thread.getMessages();
They are working, but not properly. I get the same collection of messages for every query, even there are number of new Messages added to database. But after I reload/restart Tomcat, I can get the correct result. This is silly! Another way is to build a new query directly from Message instead of by Thread->Message. Does OJB cache this operation result? Anyone can help? Thanks a lot!
Regards, Wallace
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
