Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1465

Triggering removeGroup on update/delete/insert query

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0, 3.1M1
    • Undefined future
    • Core Library
    • None

    Description

      It can be useful for this case:

      I have 2 selects (NamedQueries) for table Artists, which have SHARED
      cache policy:

      MyArtistsSelectQuery1 from group ArtistsTableGroup:
      select * from Artists where isModern = 0

      MyArtistsSelectQuery2 from group ArtistsTableGroup:
      select * from Artists where isModern = 1

      And one insert:
      MyArtistsInsertQuery1
      insert into Artists values (....) .....

      Select NamedQueries are marked by properties in XML
      <property name="cayenne.GenericSelectQuery.cacheStrategy"
      value="SHARED_CACHE"/>
      <property name="cayenne.GenericSelectQuery.cacheGroups"
      value="ArtistsTableGroup"/>

      So, I would like to mark insert query as trigger for cache group
      removingin SHARED cache, like implicit execution of:
      domain.getQueryCache().removeGroup("ArtistsTableGroup");
      after successful insert.

      some property like:
      <property name="cayenne.GenericSelectQuery.removeGroups"
      value="ArtistsTableGroup"/>

      I think it can be very useful.

      Attachments

        Activity

          People

            Unassigned Unassigned
            apparition Evgeny Ryabitskiy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: