fideslang icon indicating copy to clipboard operation
fideslang copied to clipboard

`name` field in DatasetCollection and DatasetField should be unique

Open allisonking opened this issue 2 years ago • 1 comments

Bug Description

Right now you are able to add two DatasetCollections of the same name to a Dataset. The name field should be enforced to be unique, since databases wouldn't allow i.e. two schemas of the same name.

Steps to Reproduce

  1. Add two DatasetCollections of the same name

Expected behavior

There should be a validator that prevents the second DatasetCollection from being added

Additional context

More context for why this came up in https://github.com/ethyca/fides/pull/718#issuecomment-1148046497

allisonking avatar Jun 07 '22 03:06 allisonking

I can think of a way to do DatasetCollection, but DatasetField is going to be more difficult. Fields are recursive so you can have a depth of n values, which makes the test more complex because they would need to be unique only at the same level.

sanders41 avatar Jun 07 '22 13:06 sanders41