2 Replies Latest reply on Aug 14, 2007 4:01 AM by Bruce Springfield

    findAll(null) working?

    Bruce Springfield Apprentice

      Trying to get all Objects in the POJOCache with findAll(null) but the results I get are varied. When I add 2 objects to the cache and then return the Map, the Map size is 4 objects. When I add 3 objects to the cache and return the map, the Map size is 5 objects.

        • 1. Re: findAll(null) working?
          Ben Wang Master

          Maybe posting your unit test would help here.

          • 2. Re: findAll(null) working?
            Bruce Springfield Apprentice

            Hi Ben,

            My JUnit test only has tests for attaching, detaching, and removing.

            I didn't have any tests for findAll() or findAll(null). With Jason Greene's previous post, the usage of findAll() is clear and I see that I was trying to attach multiple objects to a single id and then using findAll() and not getting the results I expected. So now findAll() and findAll(null) are working as expected.

            Except now, I cannot for some reason access the objects in the Map that is returned by findAll() with regular String keys? I have to get the keySet of the Map, then use the actual keys from the keySet to access the objects in the map. Seems to be some type of formatting or type issue.