[Nitro] [PATCH] Allow multiple joins_many style relationships between two classes (and relevent test case)

rob rob at motionpath.com
Fri Feb 17 18:51:27 EST 2006


Thanks Bryan, I only ran the join test case and not the whole suite.  
Considering how minor the modification this patch makes is I suspect  
the problem isn't the patch itself (it took advantage of an unused  
argument already present in the join_table_info method). If you don't  
get time I will check this out myself on Monday.

On 17 Feb 2006, at 20:48, Bryan Soto wrote:

> Just a quick note. After this is applied, there is a new test failure:
>
>   1) Failure:
> test_og(TCOgStore)
>     [./test/og/tc_store.rb:263:in `features_test'
>      ./test/og/tc_store.rb:76:in `test_og']:
> <1> expected but was
> <0>.
>
> I'll try and check it out later.
>
> On 2/17/06, Rob Pitt <rob at motionpath.com> wrote:
> WARNING: This patch causes join tables to be created with different
> names and will require you to manually copy join table data into newly
> named tables if applied to a project you are already using.
>
> Why would I make a patch that requires this? Not having this  
> requirement
> (i.e. doing it in an automated fashion) would be fairly complicated  
> and
> a big drain on CPU.
>
> This patch still needs to be implemented at some point because it
> enables a desirable behaviour, and we are at 0.2 so we should make
> changes with big impacts like this now rather than later.
>
> This is a very minor modification so that a model like this behaves as
> it should:
>
> Class Article
>   property :title, String
>
>   joins_many :first_join, Category
>   joins_many :second_join, Category
>   joins_many Category
>
>   def initialize(title)
>     @title = title
>   end
> end
>
> Without this patch, items you push into .first_join are visible
> in .second_join and the .categories join (all other combinations of  
> this
> are also true).
>
> This is wrong, and this patch corrects this.
>
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060217/65dc260f/attachment.html 


More information about the Nitro-general mailing list