2 Replies Latest reply on Jul 28, 2008 8:34 AM by zoggler

    Revision type

    zoggler

      I make a query with VersionsReader.forRevisionsOfEntity and i'v now the entity and the revision number. But how cann I read the revision type of this entity.

        • 1. Re: Revision type
          adamw

          Hello,

          you mean, you'd like to know if an entity was added, removed or only modified? This information isn't currently available through the public API. If that's what you mean, please add a JIRA issue :).

          A temporary workaround would be to select the minimum revision (= the revision when the entity was created) and the maximum revision (= the revision when the entity was deleted, if it doesn't exist in the "current" databse).

          Adam

          • 2. Re: Revision type
            zoggler

            Hello Adam,

            thank you for your answer.
            Yes I want to read the version type through a public API.

            example:
            VersionsQuery query = versionReader.createQuery().forRevisionsOfEntity( Entity.class,false) .add(VersionsRestrictions.idEq(Entity.getId())) ;

            ...

            Object[] result = (Object[]) revisionQeryResult.get(i);
            Entity entityObject= ((Entity) result [0]);
            Number revisionID= ((Number) result [1]);
            Number revisionType= ((Number) result [2]);


            Thanks Udo