db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Braeuchi <jbraeu...@gmx.ch>
Subject Re: [junit] Still get junit errors
Date Sun, 14 Dec 2003 10:40:56 GMT
hi all,

i get an error in QueryTest#testPrefetchedArraySingleKey. Array of 
articles is null when the using the proxy

...
//
// use ProductGroupWithArray and Articles with original Proxy settings
//
broker.clearCache();
cldArticle.setProxyClass(articleProxy);

crit = new Criteria();
crit.addEqualTo("groupId", new Integer(5));
q = QueryFactory.newQuery(ProductGroupWithArray.class, crit);
results = broker.getCollectionByQuery(q);
ProductGroupWithArray pg2 = (ProductGroupWithArray)results.toArray()[0];
InterfaceArticle[] articles = pg2.getAllArticles();
_assertNotNull_("Array of articles should not be null!", articles);
assertTrue("Array should contain more than 0 entries!",articles.length 
!= 0);
...


this is due to QueryReferenceBroker#performRetrievalTasks

...
      if (ord.isLazy() || (_ord.getItemProxyClass() != null_))
      {
        continue;
      }
...


jakob

Armin Waibel wrote:
> Hi Oleg,
> 
> I still get
> 
> 1 errors (+ one known failure) in PB
> 3 failures in ODMG
> 
> when running the test suite.
> 
> What's wrong?
> 
> regards,
> Armin
> 
> Oleg Nitz wrote:
> 
>> On Saturday 13 December 2003 12:21, Thomas Mahler wrote:
>>
>>> thanks for the quick fix. Unfortunately you changes cause a problem with
>>>  dynamic proxies. I get five junit errors after checking out your 
>>> changes.
>>
>>
>> Fixed!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 


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


Mime
View raw message