generateDraftKey

open fun generateDraftKey()

Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#isDraft EntityValue.isDraft} to true, and set the primary key for this entity to a value likely to be suitable for a local offline draft. For key properties of type int', this will be a value > 2000000000 offset by an amount determined from current UTC dateTime (month/day/hour/minute/second). For key properties of type long', this will be a value > 9000000000000000000 offset by an amount determined from current UTC dateTime (month/day/hour/minute/second). For key properties of type string', 'binary' or 'guid', this will be a random GUID value converted to the appropriate type. For key properties of type string' where the {@link com.sap.cloud.mobile.kotlin.odata.Property#maxLength Property.maxLength} is insufficient to hold a GUID (between 10 and 31 inclusive), then the value will be the string equivalent of the value that would be used for type 'long' or 'int', whichever should fit. For key properties of type `binary' where the {@link com.sap.cloud.mobile.kotlin.odata.Property#maxLength Property.maxLength} is insufficient to hold a complete GUID (less than 16 bytes), then a random GUID value will be truncated to fit. Key properties of any other data type will not be set.