Get specific version of an object


#1

If your type has versionHistory enabled, you can use getVerison field from meta to get specific version of the record.

example:

@db(versionHistory = "true")
entity type SampleType schema name "SMPL_TYPE"

//Query to get version 1
SampleType.make({id:"123", meta:{getVersion:1}}).get()

//This will fetch you the latest version and versionEdits will show all the changes for that edit
SampleType.fetch({include:"this,versionEdits"})

Does @db(versionHistory=true) work for Cassandra (TimedDataPoint) Types?
How to view previous version of the same data point