Page 1 of 1

Creating a dataset and having OMERO set an automatic id

PostPosted: Thu Jan 27, 2011 5:21 pm
by icaoberg
I know that from script I can do
Code: Select all
dataset = omero.model.DatasetI()
id = 3425235523523
dataset.setId( id )


but is there a way to have omero set this number automatically?

Re: Creating a dataset and having OMERO set an automatic id

PostPosted: Thu Jan 27, 2011 5:35 pm
by cxallan
It would do so for you if you saved it, yes.

Re: Creating a dataset and having OMERO set an automatic id

PostPosted: Thu Jan 27, 2011 5:50 pm
by icaoberg
so if i create a dataset and save the dataset, omero will assign an id automatically?

Re: Creating a dataset and having OMERO set an automatic id

PostPosted: Thu Jan 27, 2011 5:52 pm
by cxallan
Absolutely. It will also guarantee that ID is unique for that OMERO instance.