Project

General

Profile

query_patch.rb from budget plugin

Added by Vasia Pupkin over 15 years ago

i have "Declarant" model many to many "Issue" Model through "Negotiator Model" like in http://www.jumbabox.com/2008/06/ruby-on-rails-many-to-many-tutorial/ tutorial
and i want to see, sort and filter columns "full_name" and "organization" from my "Declarant" model where declarant.negotiators.first.negotiator = false
i write full_name_query_patch.rb based on query_patch.rb http://pastebin.com/m60d0aa86 and i have error http://pastebin.com/m7c1f6687
i think that this patch returns error because its dont support many to many relationship, but i dont know how to write it is right
pls help me with this


Replies (2)

RE: query_patch.rb from budget plugin - Added by Eric Davis over 15 years ago

Your patch is saying declarant_id is the field in the issues table to search on. Since it doesn't exist, Redmine is throwing an error (your second paste). You will need to change your relationships or find another way to add them to Queries.

Eric

RE: query_patch.rb from budget plugin - Added by Vasia Pupkin over 15 years ago

i cant change relations between tables.. help me to find another way to add my entity to Queries.

im always have 1 or 2 declarants and i need to represent one declarant who is not negotiator

    (1-2/2)