1 Reply Latest reply on Dec 17, 2002 12:01 PM by Adrian Brock

    CMP question

    Michael Jonas Newbie

      Two cmp questions:

      a) Does the Collection returned by a find call manage a Cursor object to the database and create the beans as needed or does create all of them when the find is issued?!

      b) How does CMP manage referential integrity?! I noticed some people use MySQL as backend?! I can't figure out how this should work without custom code?! What happens when remove is called on a object still referenced by another bean?!

        • 1. Re: CMP question
          Adrian Brock Master

          One question per thread please. :-)

          a) It depends upon config, but the default behaviour
          find gets the primary keys
          Using the collection loads a "page" of rows
          into a readahead cache from which beans are constructed
          as you access the collection element.
          The data loaded depends upon your load-groups.
          Of course the beans may already be in cache.
          Once the original number of rows has been processed,
          it loads the next page, etc.

          b) Don't you mean CMR? Again it depends upon your config.
          The default is to just unlink the data, but you
          can specify <cascaded-delete/>