[Midas] uuid
Mona Wong
mona at sdsc.edu
Wed Sep 26 15:56:19 EDT 2012
I have a question about which uuid to use when saving a file.
I have the following code in my controller:
$ItemModel = MidasLoader::loadModel('Item');
$lastRevisionDao = $ItemModel->getLastRevision ( $itemDao );
and output of those 2 variables give me:
itemDao : ItemDao Object
(
[_model] => Item
[key:protected] =>
[_key] => item_id
[saved] => 1
[item_id] => 62884
[name] => rkd2_merged_phase001.nii.axml
[description] =>
[type] => 0
[sizebytes] => 3027
[date_creation] => 2012-09-24 20:58:33
[date_update] => 2012-09-24 20:58:33
[thumbnail_id] =>
[view] => 0
[download] => 5
[privacy_status] => 2
[uuid] => 506101b9646c4f0e1bea6ba75c3ad5aa7bef3f45eaf71
)
lastRevisionDao : ItemRevisionDao Object
(
[_model] => ItemRevision
[key:protected] =>
[_key] => itemrevision_id
[saved] => 1
[itemrevision_id] => 62848
[item_id] => 62884
[revision] => 3
[date] => 2012-09-06 20:53:51
[changes] =>
[user_id] => 13
[license_id] =>
[uuid] => 506101b996a2811ecc80a82bff73b3b90bdfcaab11d16
)
So there is a uuid for the item and a different uuid for the last revision. Is the uuid for the $itemDao for the first revision? If I use the $itemDao's uuid on a call to midas.item.create, what will happen? If I want to save a new revision of the item, should I go through the process similar to creating a new item: midas.item.create -> midas.upload.generatetoken -> midas.upload.perform ?
Mona
*********************************************
Mona Wong
Web & iPad Application Developer
San Diego Supercomputer Center
Believing we are in control is an
illusion that brings suffering.
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20120926/b9b77e98/attachment.htm>
More information about the Midas
mailing list