On Saturday, August 31, 2013 10:53:20 AM UTC-7, Jeremy Evans wrote:

> On Saturday, August 31, 2013 10:43:50 AM UTC-7, 1gor wrote:
>
>> I have a table with the composite primary key, the migration file 
>> (fragment) looks like this (sequel 4.1.1/postgres 9.1):
>>
>>       String :ticker
>>       column :time, 'timestamp with time zone'
>>       column :parent_time, 'timestamp with time zone'
>>       Integer :timescale, :null=>false  
>>       primary_key [:ticker,:timescale,:time]
>>       foreign_key [:ticker,:timescale,:parent_time], :monitor_vals, :key=>
>>       [:ticker,:timescale,:time], :on_delete=>:cascade, 
>> :on_update=>:cascade
>>
>> In my model file I set the rcte_tree plugin up like this:
>>
>>      plugin :rcte_tree, :key=>[:ticker,:timescale,:parent_time], 
>>      :primary_key=> [:ticker,:timescale,:time]
>>
>>
> The rcte_tree plugin doesn't support currently composite keys.  Neither 
> does the regular tree plugin.  While Sequel::Model core supports composite 
> keys, you should not expect that all plugins that ship with Sequel support 
> them (though many do).
>
> I'll certainly consider patches that add composite key support to either 
> plugin, assuming they are accompanied with specs and integration tests.
>
>
I pushed some changes today that allow the tree and rcte_tree plugins to 
support composite keys: 

https://github.com/jeremyevans/sequel/commit/33b45e947b9cabe31d9245e8e007c45e79d4991b
https://github.com/jeremyevans/sequel/commit/f840f60136b35b17e98096669d72ed0bee2b7443

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to