On Aug 28, 2009, at 3:58 PM, Owen wrote:

>
> The last thread was a great discussion.  I would like to clarify my
> understanding for your feedback using the example below:
>
> (Hobo doesn't use the" :unique => true" or ":required=> true", so why
> ":index = true" instead of ":indexed" ?)

Hmmm.. must have been a while since I used those options. I was  
assuming that they worked like :primary_content, :name, :login  
and :creator. Maybe they should?

> <!-- ====== The Hobo Way ====== -->
> fields do
>
>    <!-- ====== short-and-sweet wayto declare indexes ====== -->
>    last_name   :string, :required, :indexed
>    state_code  :string, :required, :unique, :length =>
> 2, :indexed

The state_code example doesn't parse - once the implicit hash literal  
is started, it's not possible to have other non-hashy args.

Also, this loses the ability to have a custom name for the index.

> end
>
> <!-- ====== Foreign keys will NOT be indexed:====== -->
> has_many :cars, :index => false
>
> <!-- ======  Foreign keys WILL be indexed:====== -->
> has_many :posts

These should both be belongs_to (which declares the key) rather than  
has_many, but makes sense otherwise. Note that the index naming is  
also missing here.

--Matt Jones

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to