Revision 9649c3cb
Added by Marc Dequènes over 15 years ago
- ID 9649c3cbb785f2f5915ca432f50955eeb7eca91e
config/test.conf | ||
---|---|---|
presentation:
|
||
desc_attribute: o
|
||
hidden_attributes: ['objectClass', 'founder']
|
||
associated_relations: ['foundersIndividuals', 'foundersEntities']
|
||
relations:
|
||
foundersIndividuals:
|
||
type: :has_many
|
test.rb | ||
---|---|---|
taken_attr_list = taken_attr_list.uniq & attr_list
|
||
obj_info = fetch_attributes_data(taken_attr_list, options)
|
||
attr_list -= taken_attr_list
|
||
obj_info.merge!(fetch_relations_data(rel_list, options)) unless rel_list.empty?
|
||
|
||
# manage general relations
|
||
if self.class.presentation[:associated_relations]
|
||
taken_rel_list = self.class.presentation[:associated_relations] & rel_list
|
||
unless taken_rel_list.empty?
|
||
obj_info.merge!(fetch_relations_data(taken_rel_list, options))
|
||
rel_list -= taken_rel_list
|
||
end
|
||
end
|
||
|
||
# second pass to dispath the remaining attributes
|
||
unless attr_list.empty?
|
Also available in: Unified diff
[evol] object general data now has associated relations (instead of gathering all possible remaining relations)