Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should code and AVId be unique? #184

Open
pedroripper opened this issue Oct 4, 2023 · 0 comments
Open

Should code and AVId be unique? #184

pedroripper opened this issue Oct 4, 2023 · 0 comments

Comments

@pedroripper
Copy link
Member

Currently, one can create two elements from the same collection or not, with the same codes and AVIds

using PSRClassesInterface; PSRI = PSRClassesInterface

temp_path = joinpath(tempdir())
data = PSRI.create_study(PSRI.OpenInterface(); data_path = temp_path)

PSRI.create_element!(data, "PSRBus",   "AVId" => "1", "code" => Int32(1))
PSRI.create_element!(data, "PSRBus",   "AVId" => "1", "code" => Int32(1))
PSRI.create_element!(data, "PSRSerie", "AVId" => "1", "code" => Int32(1))

The unique identifier that is used in PSRI is reference_id, which the user cannot set by themself. PSRI "calculates" the reference_id for the new element during creation.

Should we set code and AVId to be unique? Either for elements from the same collection or the whole study.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant