OnAfterCreate hook retrieves the temporary identity of a document rather than the permanent

I have created server-side hooks to record changes to the DB in an audit_trail table.
The hook is an implementation of ORecordHook.
In the onTrigger method I have the following code:
if (oRecord instanceof ODocument)
ODocument doc = (ODocument)oRecord;
String rid = doc.getIdentity().toString();

case AFTER_CREATE: createHook(…, rid, …)
The rid I’m getting is the temporary @rid rather than the actual permanent one.

Hi, which version of ODB are you using?

The version of OrientDB is 3.0.12

I have tested it now with all version up to 3.0.18 and the problem is the same:
In onTrigger(), TYPE.AFTER_CREATE, oRecord.getIdentity() returns a negative cluster position.
See issue #8814