thecodingmachine / tdbm

The Database Machine is a PHP ORM that requires no configuration. The object model is deduced from the database model.
https://thecodingmachine.github.io/tdbm/
119 stars 27 forks source link

UniqueEntity Annotation #246

Open mhlsf opened 3 years ago

mhlsf commented 3 years ago

UniqueEntity annotation doesn't work with TDBMObject, that force us to create a method for each Dao to check unicity of an object base on a field in a table.

As a workaround, I made a custom constraint as Symfony validation documentation says.

It would be nice if it was directly available inside of TDBM as this is a commonly used feature.

Is this something that should be done here are on https://github.com/thecodingmachine/graphqlite-symfony-validator-bridge ?

Thank you