1 Reply Latest reply on Aug 25, 2008 4:24 AM by adamw

    Values on Delete

      Hi

      As a consequence of my previous post I would need to see the values of deleted entities... not everything nulled out expect the identifier(s).

      Perhaps this could be configured in the persistence.xml with something like
      this:

      property name="org.jboss.envers.storeValuesForDeletedEntities" value="true" as a global hint or in the @Versioned Annotation as a per Class/Method hint - @Versioned(storeEntityValueOnDelete = true).

      What do you mean?

        • 1. Re: Values on Delete
          adamw

          Hello,

          the one-but-last revision of a deleted entity holds the last values of a deleted entity.

          In trunk, the revisions-of-entity query has a new parameter, whether to select the "delete" revision with null data or not.

          If you know that an entity is deleted, then you could select its last data, by creating a revisions-of-entity query, with "selectDeletedEntities" set to false, ordering the results by the revision number, descending and setting the limit on the number of results to 1.

          Provided, of course, that I've understood your problem well :)

          Adam