Skip to content

Morphia extension that transparently archives old versions of entities allowing for rollbacks

License

Notifications You must be signed in to change notification settings

evanchooly/lariat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lariat

A semi-experimental extension to morphia that transparently archives old versions of your entities and allows for rollbacks to previous states. e.g., the class below will be archived in to the collection records_archive and will keep only the last 3 versions. More docs and examples are (probably) on the way but for now see LariatTest.java.

    @Entity("records")
    public class Record {
        public static final int MAX_ARCHIVE_COUNT = 3;

        @Id
        private ObjectId id;
        private String name;
        private String content;
        @Version
        @Archived(count = Record.MAX_ARCHIVE_COUNT)
        private long version;
    }

About

Morphia extension that transparently archives old versions of entities allowing for rollbacks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages