Get specific version of an object


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


@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

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