Hi guys,

I'm trying to understand what validate_and_insert() 
and validate_and_update() are doing to see if I can use it reliably.
I'm writing an API, and I have no need for form validation. So after 
spending sometime reading the DAL code, I still have a few questions:

- When I insert a record that already exists (unique field), 
validate_and_insert() is smart enough to tell me that the record already 
exist, but I can't figure out how? I can't find out which "select" 
statement it's doing. 
- If the validation is per-field, and the table has 5 "unique" fields, will 
DAL make 5 selects before inserting?
- Is it possible to get more than one error in return dict from 
validate_and_insert() ret.errors?  
- What people are using for DAL/DB layer validations on rest APIs? From my 
google searches, it looks like not a lot of people are using 
validate_and_insert().

Thanks! :)

-- 



Reply via email to