jacaetevha/sugarcrm — comment on commit 0636284e801a3aa191a0427f64e7caf2f1530e0a
File:  line 0
By jacaetevha:

Sorry, another false alarm. I didn't have the rt_communities_id_c in
the fields list of the find(:all) query.

--
Jason Rogers

On Mon, Jan 23, 2012 at 22:52, Jason Rogers wrote:
> No, RTCommunity and AbcBuilder are not the same module. Sorry for the
> confusion. Sugar doesn't seem as intuitive to me as SFDC is.
>
> I'd just like to be able to do: RTCommunity.all and cache the result,
> but it looks like that's not going to happen.
>
> Also, when I do a RTOccupant.find_by_nnn the RTCommunity gets
> dereferenced properly and the occupant has both rt_communities_id_c
> and community_c populated. But a query of find(:all) only populates
> community_c. Any clue?
>
> --
> Jason Rogers
>
>
>
> On Mon, Jan 23, 2012 at 22:26, Jason Rogers wrote:
>> There is no association for rt_communities. There is a
>> communities_builder in which both module and bean_name are empty
>> strings.
>>
>> Is it that there is something amiss in the client's Sugar instance?
>> Perhaps they renamed the module? So your gem thinks there is an
>> RTCommunity and AbcBuilder module, but they are one in the same? I'm
>> just grasping at straws here.
>>
>> Thanks a lot for the support. It's very kind of you!
>>
>> --
>> Jason Rogers
>>
>>
>>
>> On Mon, Jan 23, 2012 at 21:30, Carl Hicks
>>
>> wrote:
>>> Excellent, I should have said '''AbcBuilder''', sorry :)
>>>
>>> If you look at the output of "associations", and you search for a proxy_method that includes "community". You get something like this:
>>>
>>> #
>>>
>>> '''@target=false''', means that the gem doesn't know which module is associated with this class. This is probably because it wasn't provided in the module metadata we received from a '''get_module_fields''' call (we look for the module name in the "module" or "bean_name" entry of the returned metadata).
>>>
>>> Can you run:
>>>
>>> SugarCRM.connection.get_module_fields("AbcBuilders")
>>>
>>> And look for a line like:
>>>
>>> "rt_communities"=>
>>> {"name"=>"communities_builders",
>>> "type"=>"link",
>>> "relationship"=>"communities_builders",
>>> "module"=>"",
>>> "bean_name"=>""},
>>>
>>> Let me know if "module" and or "bean_name" are empty. If so, try editing the vardefs and adding the appropriate module name.
>>>
>>> ---
>>> Reply to this email directly or view it on GitHub:
>>> https://github.com/jacaetevha/sugarcrm/commit/0636284e801a3aa191a0427f64e7caf2f1530e0a#commitcomment-894694