[Nitro] Annotation, validation

Jonathan Buch john at oxyliquit.de
Sat Feb 10 04:47:43 EST 2007


> and vice versa?  I can see, possibly, not wanting to create validators
> and add overhead when you're expecting the backing store to accomplish
> that, but I guess that's the broader issue: couldn't the store adaptor
> determine whether validate_unique should generate a validator or add a
> UNIQUE constraint, or it's equivalent?

this could be done, but as you said, it would create overhead.  For a
uniqe check, one database roundtrip is required.  Depending on how fast
you insert data this will kill performance.

I vote for making this 'auto validator generator' despite this.

But, we have to provide a way to go around the validators then.  I don't
remember exactly if .save! will do this...


Feel the love

More information about the Nitro-general mailing list