bojanb wrote:
>
> My issue with SQLA validators is that they don't allow inconsistent
> state even on fields of a single object, which makes multi-field
> validation impossible.

meaning, you set A.a and you can't depend on A.b being correct yet ?  
Well sure.  How would you have it done ?  Something has to trigger the
"validate" event at some point.     So if you need to wait for all of A.a,
A.b, A.c, etc. to be setup first, then sure you'd throw your validation
into before_flush() or mapper extension before_insert()/before_update() -
or just tailor your classes' interface as needed, such as A.set_values(a,
b, c).   Personally I opt for the latter since its simple and produces an
immediate validation effect rather than waiting for a flush.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to