7 Replies Latest reply on Dec 30, 2008 2:05 AM by Adam Warski

    @Unversioned once again

    Michal Orman Newbie

      Hello all.

      I've tried @Unversioned annotation approach to disable versioning for referenced entities, and I have one suggestion. While it is good idea to have such "disabling" possibility this approach is not practical when have lot of entities.

      I've tried to integrate envers in project with 50+ entities, where only a subset is versioned. It was horrible to add one @Versioned and several @Unversioned annotations and run application just to check where I missed the @Unversioned this time.

      Why not use other approach. Simply assume that if entity is not explicitly @Versioned then it is implicitly @Unversioned. I've modified VersionsMetadataGenerator class in such way that instead of throwing MappingException it just returns. For me it works fine, and I think that this is better approach. I've modified only addToOne method while it was only needed for me. I don't analyse other methods and possible consequences of such modification ;).

      What do you think about it?