I added additional fixes to recursively cascading associations. This patch includes fixes for has_many :through and habtm (with tests) as well as tests for has_one and belongs_to. I created some new models for testing and added the required sql for creating and dropping the tables. This is _only_ tested on postgresql. As a quick summary, here are some examples that previously would not work and are now tested and/or fixed: root_node = RecursivelyCascadedTreeMixin.find(:first, :include=> {:first_child=>{:first_child=>:first_child}}, :order => ''mixins.id'') leaf_node = RecursivelyCascadedTreeMixin.find(:first, :include=> {:parent=>{:parent=>:parent}}, :order => ''mixins.id DESC'') source = Vertex.find(:first, :include=>{:sinks=>{:sinks=> {:sinks=>:sinks}}}, :order => ''vertices.id'') sink = Vertex.find(:first, :include=>{:sources=>{:sources=> {:sources=>:sources}}}, :order => ''vertices.id DESC'') _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Is this a patch against trunk, which includes your previous patch? On 8/15/06, Rich Collins <richcollins@gmail.com> wrote:> > I added additional fixes to recursively cascading associations. This > patch includes fixes for has_many :through and habtm (with tests) as > well as tests for has_one and belongs_to. I created some new models > for testing and added the required sql for creating and dropping the > tables. This is _only_ tested on postgresql. > > As a quick summary, here are some examples that previously would not > work and are now tested and/or fixed: > > root_node = RecursivelyCascadedTreeMixin.find(:first, :include=> > {:first_child=>{:first_child=>:first_child}}, :order => ''mixins.id'') > leaf_node = RecursivelyCascadedTreeMixin.find(:first, :include=> > {:parent=>{:parent=>:parent}}, :order => ''mixins.id DESC'') > source = Vertex.find(:first, :include=>{:sinks=>{:sinks=> > {:sinks=>:sinks}}}, :order => ''vertices.id'') > sink = Vertex.find(:first, :include=>{:sources=>{:sources=> > {:sources=>:sources}}}, :order => ''vertices.id DESC'') > > > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > >_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Yes. I did an update before I did the diff. On Aug 15, 2006, at 9:18 PM, Jeremy Kemper wrote:> Is this a patch against trunk, which includes your previous patch? > > On 8/15/06, Rich Collins <richcollins@gmail.com > wrote: > I added additional fixes to recursively cascading associations. This > patch includes fixes for has_many :through and habtm (with tests) as > well as tests for has_one and belongs_to. I created some new models > for testing and added the required sql for creating and dropping the > tables. This is _only_ tested on postgresql. > > As a quick summary, here are some examples that previously would not > work and are now tested and/or fixed: > > root_node = RecursivelyCascadedTreeMixin.find(:first, :include=> > {:first_child=>{:first_child=>:first_child}}, :order => '' mixins.id'') > leaf_node = RecursivelyCascadedTreeMixin.find(:first, :include=> > {:parent=>{:parent=>:parent}}, :order => ''mixins.id DESC'') > source = Vertex.find(:first, :include=>{:sinks=>{:sinks=> > {:sinks=>:sinks}}}, :order => ''vertices.id'') > sink = Vertex.find(:first, :include=>{:sources=>{:sources=> > {:sources=>:sources}}}, :order => '' vertices.id DESC'') > > > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
On 8/15/06, Rich Collins <richcollins@gmail.com> wrote:> > Yes. I did an update before I did the diff. >Ah, appears the attachment is the same diff as the last patch. Could you pass along the new patch? Thanks, jeremy On Aug 15, 2006, at 9:18 PM, Jeremy Kemper wrote:> Is this a patch against trunk, which includes your previous patch? > > > On 8/15/06, Rich Collins <richcollins@gmail.com > wrote: > > > > I added additional fixes to recursively cascading associations. This > > patch includes fixes for has_many :through and habtm (with tests) as > > well as tests for has_one and belongs_to. I created some new models > > for testing and added the required sql for creating and dropping the > > tables. This is _only_ tested on postgresql. > > > > As a quick summary, here are some examples that previously would not > > work and are now tested and/or fixed: > > > > root_node = RecursivelyCascadedTreeMixin.find(:first, :include=> > > {:first_child=>{:first_child=>:first_child}}, :order => '' mixins.id'') > > leaf_node = RecursivelyCascadedTreeMixin.find(:first, :include=> > > {:parent=>{:parent=>:parent}}, :order => ''mixins.id DESC'') > > source = Vertex.find(:first, :include=>{:sinks=>{:sinks=> > > {:sinks=>:sinks}}}, :order => ''vertices.id'') > > sink = Vertex.find(:first, :include=>{:sources=>{:sources=> > > {:sources=>:sources}}}, :order => '' vertices.id DESC'') > > > > > > > > _______________________________________________ > > Rails-core mailing list > > Rails-core@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > > > > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > >_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Ah sorry I grabbed the old diff. Here is the new one with the proposed changes. . On Aug 15, 2006, at 11:09 PM, Jeremy Kemper wrote:> On 8/15/06, Rich Collins <richcollins@gmail.com> wrote: > Yes. I did an update before I did the diff. > > Ah, appears the attachment is the same diff as the last patch. > Could you pass along the new patch? > > Thanks, > jeremy > > > On Aug 15, 2006, at 9:18 PM, Jeremy Kemper wrote: > Is this a patch against trunk, which includes your previous patch? >> >> On 8/15/06, Rich Collins < richcollins@gmail.com > wrote: >> I added additional fixes to recursively cascading associations. This >> patch includes fixes for has_many :through and habtm (with tests) as >> well as tests for has_one and belongs_to. I created some new models >> for testing and added the required sql for creating and dropping the >> tables. This is _only_ tested on postgresql. >> >> As a quick summary, here are some examples that previously would not >> work and are now tested and/or fixed: >> >> root_node = RecursivelyCascadedTreeMixin.find(:first, :include=> >> {:first_child=>{:first_child=>:first_child}}, :order => '' mixins.id'') >> leaf_node = RecursivelyCascadedTreeMixin.find (:first, :include=> >> {:parent=>{:parent=>:parent}}, :order => ''mixins.id DESC'') >> source = Vertex.find(:first, :include=>{:sinks=>{:sinks=> >> {:sinks=>:sinks}}}, :order => ''vertices.id'') >> sink = Vertex.find(:first, :include=>{:sources=>{:sources=> >> {:sources=>:sources}}}, :order => '' vertices.id DESC'') >> >> >> >> _______________________________________________ >> Rails-core mailing list >> Rails-core@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-core >> >> >> >> >> _______________________________________________ >> Rails-core mailing list >> Rails-core@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
On 8/16/06, Rich Collins <richcollins@gmail.com> wrote:> > Ah sorry I grabbed the old diff. Here is the new one with the proposed > changes. >Thanks - http://dev.rubyonrails.org/changeset/4776 jeremy On Aug 15, 2006, at 11:09 PM, Jeremy Kemper wrote:> > On 8/15/06, Rich Collins <richcollins@gmail.com> wrote: > > > > Yes. I did an update before I did the diff. > > > > Ah, appears the attachment is the same diff as the last patch. Could you > pass along the new patch? > > > On Aug 15, 2006, at 9:18 PM, Jeremy Kemper wrote: > > Is this a patch against trunk, which includes your previous patch? > > > > > > On 8/15/06, Rich Collins < richcollins@gmail.com > wrote: > > > > > > I added additional fixes to recursively cascading associations. This > > > patch includes fixes for has_many :through and habtm (with tests) as > > > well as tests for has_one and belongs_to. I created some new models > > > for testing and added the required sql for creating and dropping the > > > tables. This is _only_ tested on postgresql. > > > > > > As a quick summary, here are some examples that previously would not > > > work and are now tested and/or fixed: > > > > > > root_node = RecursivelyCascadedTreeMixin.find(:first, :include=> > > > {:first_child=>{:first_child=>:first_child}}, :order => '' mixins.id'') > > > leaf_node = RecursivelyCascadedTreeMixin.find (:first, :include=> > > > {:parent=>{:parent=>:parent}}, :order => ''mixins.id DESC'') > > > source = Vertex.find(:first, :include=>{:sinks=>{:sinks=> > > > {:sinks=>:sinks}}}, :order => ''vertices.id'') > > > sink = Vertex.find(:first, :include=>{:sources=>{:sources=> > > > {:sources=>:sources}}}, :order => '' vertices.id DESC'') > > > >_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core