[Nitro] Annotation, validation

George Moschovitis george.moschovitis at gmail.com
Fri Feb 9 15:06:00 EST 2007


This was on my todo list some time ago, I seem to have forgotten this. If
you can provide a patch it would be nice ;-)

-g.

On 2/9/07, Judson Lester <nyarly at gmail.com> wrote:
>
> Again, an architectural question.
>
> Is there a reason that:
>
> class AnEntity
>   attr_accessor :thing, String, :unique => true
> end
>
> doesn't imply
>
> class AnEntity
>   attr_accessor :thing, String
>   validate_unique :thing
> end
>
> 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?
>
> Judson
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>



-- 
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070209/59b6b58f/attachment.html 


More information about the Nitro-general mailing list