Hi,
can i set a string field as "unique" (not duplicate)?
Best regards.
Fabrizio
2 Answers, 1 is accepted
0
Kristian Nikolov
Telerik team
answered on 11 Jul 2014, 10:51 AM
Hello Fabrizio,
At runtime, you can use our Low Level ADO.API to execute SQL script that specifies a table column as unique.
However it is not currently possible to specify non Primary Key property as unique via your model and then push the constraint to the database. We do however have a request for such feature at our Feedback Portal. We would like to invite you to vote for it as doing so will help us to prioritize its eventual implementation.
You can also consider whether a custom validation attribute would be and applicable approach for your situation.
I hope this helps. If you have additional questions or need help, feel free to post at our forums again.
Regards,
Kristian Nikolov
Telerik
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.