feathers-plus / generator-feathers-plus

A Yeoman generator to (re)generate a FeathersJS application supporting both REST and GraphQL architectural concepts and their query languages.
https://generator.feathers-plus.com/
Other
44 stars 30 forks source link

Compound key in uniqueItemProperties? #280

Closed khuongduybui closed 4 years ago

khuongduybui commented 5 years ago

Does the schema.js / validate.js supports uniqueItemProperties with a compound key? For example, I have a Project model with 2 fields projectName and clientName (and a bunch more metadata that we don't need to care about) and I don't want 2 projects to have BOTH same project name and client name; only 1 duplicate should be fine.

Can I do this with just the schema.js / validate.js file, or do I need to write my custom hook?