simphony / simphony-metadata

[LEGACY] This repository contains the metadata definitions used in SimPhoNy project.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Confusing attribute names for uuid/uid #15

Closed kitchoi closed 8 years ago

kitchoi commented 8 years ago

In simphony-common, we have been using uid instead of uuid as the attribute name. But here in the metadata we have uuid as the attribute name. We should settle on using one of them.

https://github.com/simphony/simphony-common/issues/20 https://github.com/simphony/simphony-common/pull/61 https://github.com/simphony/simphony-common/pull/286 https://publicwiki-01.fraunhofer.de/SimPhoNy-Project/index.php/SimPhoNy_Metadata_Schema#Converting_a_general_metadata_element_to_a_class

roigcarlo commented 8 years ago

I agree.

As you point in simphony/simphony-common#20 we decided to use uid. I remember that the main reason for that was to unify the id of the Cuba objects (see also the discussion in simphony/simphony-common#19) since we were using different approaches. But no one really gave a strong reason to use id, uid or uuid.

In my opinion we should stick to uid just for convenience (maybe this way managing components inside the cuds container can even be simplified?). But if there is a reason to move it shouldn't be a problem.

kitchoi commented 8 years ago

I prefer uid too so that it doesn't clash with the module name uuid. That would require either renaming CUBA.UUID to CUBA.UID or have the generator take care of this naming and generate an attribute of uid. Changes in https://github.com/simphony/simphony-common/pull/286 will need some amendment too given uuid is used there. @ahashibon, @mehdisadeghi

mehdisadeghi commented 8 years ago

I think we can use uid in the code, since it has been decided in the past.

kitchoi commented 8 years ago

Fixed in #17, closing.