I have tried unique sql_constaints using two different methods using flower brackets {} or square brackets [].
Both works fine.
Which one is correct?
_sql_constraints = {
('email_uniq', 'unique(email)', ' Please enter Unique Email id.')
}
(or)
_sql_constraints = [
('email_uniq', 'unique(email)', ' Please enter Unique Email id.')
]
P.S: But when I want to use more than a single constraint it only accepting square brackets [] like this.
_sql_constraints = [
('email_uniq', 'unique(email)', ' Please enter Unique Email id.')
('contact_uniq', 'unique(contact)', ' Please enter Unique Mobile no.')
]
What is the reason behind it.