Step to reproduce:
- select a File document in a content view and push the Copy button
- push the Paste button
- a new document is created in the same folder: get its id (cd551cce-5322-4368-b045-e13086f250bb in my example)
- edit the new document and increment the minor version
- run the following SQL query against your database
select * from versions where versionableid='cd551cce-5322-4368-b045-e13086f250bb'; id | versionableid | created | label | description | islatest | islatestmajor --------------------------------------+--------------------------------------+-------------------------+-------+-------------+----------+--------------- ba10d4af-9045-48bc-be46-0c293b84b408 | cd551cce-5322-4368-b045-e13086f250bb | 2016-05-26 14:38:00.815 | | | t | f
=> the label value is empty
This value is returned when calling session.getLastVersion(docRef).getLabel().