[OGo-Developer] Multi-Valued Company Values [Was: FYI: time constrained company_value attributes]

Adam Tauno Williams developer@opengroupware.org
Tue, 13 May 2008 20:08:29 -0400


> > Unless there is some magic in the gdl layer I'm unaware of, looking at
> > Logic's LSFetchExtendedAttributesCommand command I'd wager a beer it
> > won't be happy seeing multiple records for the same companyId
> > +attribute. :)  Or maybe I haven't had enough caffeine yet.
> Hm, that doesn't look too bad. It keeps a Map, but also seems to  
> preserve the array:
> ---snip---
>      [obj takeValue:map       forKey:@"attributeMap"];
>      [obj takeValue:newAttrs  forKey:@"companyValue"];
> ---snap---
> So there is hope ;-)

SELECT company_value_id, value_string
FROM company_value
WHERE company_id = 10100 AND attribute = 'salesperson'

company_value_id value_string
11220290 MNO
11220280 XYZ
3962570 ABC

It just returns one value,  appears to be the last value processed.

ogo-qsearch-persons -login adam -password fred123 'companyId = 10100'
...
  email2              : awilliam@whitemice.org <NSShortInline8BitString>
  salesperson         : MNO                  <NSShortInline8BitString>
  headboy             : no                   <NSShortInline8BitString>
...