Closed FredrikKarlssonSpeech closed 6 years ago
The problem here is that the add_attributeDefinition
should not allow for an attribute to be added to any levelDefinition if that attribute name is already taken. Currently attribute definition names have to be unique across the entire emuDB. Thanks for pointing this out... should be a fairly easy fix.
I am fairly convinced that the docs for 'rename_attributeDefinition()' is not saying the correct thing, but I need guidance on what the correct behavior should be.
The portion of the docs I just saw is saying this:
Now, this seems to not be true, as you can certainly insert an attribute on a level that is a duplicate of an attribute of a another level. Like this (using the 'ae' database):
Now, calling `
is ambiguous.
So, what should be the correct behavior be here? Should a 'levelName' formal argument should be added to rename_attributeDefinition, or is it the case that attributes of levels really should be unique, and ny 'add_attributeDefinition' call above should really have been stopped.
I think the second option is the intended behavior, as otherwise queries should start being ambiguous. In that case, there should be checks in 'add_attributeDefinition'