[Nitro] Annotation, validation

Judson Lester nyarly at gmail.com
Fri Feb 9 13:30:06 EST 2007

Again, an architectural question.

Is there a reason that:

class AnEntity
  attr_accessor :thing, String, :unique => true

doesn't imply

class AnEntity
  attr_accessor :thing, String
  validate_unique :thing

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?


More information about the Nitro-general mailing list