I don't think you can generate a cdbRecordID at will - although Mark will confirm.
I've had a similar scenario where i had existing primary/foreign keys in UUID format. I solved it by creating new foreign key for each record that corresponds to the correct cdbRecordID.
1. create columns for primary/foreign keys in all tables affected; these store your existing keys (while of course each record has the liveCloud derived cdbRecordID)
2. for each foreign key, i set up a function to return the cdbRecordID of the record that contains the correct primaryKey in the new primary key column
3. I then replace or store in a new column a new foreign key that corresponds
4. The final result is that all foreign keys now point to the correct cdbRecordID as primary key, and i no longer need the old primary/foreign keys.
hope that helps (or even makes sense!)
Stam
I've had a similar scenario where i had existing primary/foreign keys in UUID format. I solved it by creating new foreign key for each record that corresponds to the correct cdbRecordID.
1. create columns for primary/foreign keys in all tables affected; these store your existing keys (while of course each record has the liveCloud derived cdbRecordID)
2. for each foreign key, i set up a function to return the cdbRecordID of the record that contains the correct primaryKey in the new primary key column
3. I then replace or store in a new column a new foreign key that corresponds
4. The final result is that all foreign keys now point to the correct cdbRecordID as primary key, and i no longer need the old primary/foreign keys.
hope that helps (or even makes sense!)
Stam