join on collectionobjects_common_fieldcollectionplaces as the field was changed to be repeating
inc.returnDate returnDate,
h1.name AS "csid",
co.objectnumber AS "objectnumber",
-co.fieldcollectionplace AS site,
+fieldcollectionplace.item AS site,
ong.objectName AS "objectname",
bd.item AS description,
oppp.objectproductionpeople AS productionpeople
LEFT OUTER JOIN hierarchy h3 ON (co.id = h3.parentid AND h3.primarytype='objectNameGroup' AND h3.pos=0)
LEFT OUTER JOIN objectnamegroup ong ON (ong.id=h3.id)
LEFT OUTER JOIN collectionobjects_common_briefdescriptions bd ON (bd.id=co.id and bd.pos=0)
+LEFT OUTER JOIN collectionobjects_common_fieldcollectionplaces fieldcollectionplace ON (fieldcollectionplace.id = co.id AND fieldcollectionplace.pos = 0)
left outer join hierarchy h4 on (co.id=h4.parentid and h4.pos=0 and h4.name='collectionobjects_common:objectProductionPeopleGroupList')
left outer join objectproductionpeoplegroup oppp on (oppp.id=h4.id)
LEFT OUTER JOIN misc m ON (m.id = co.id)
lic.loanInNote as loanInNote,
h1.name AS "csid",
co.objectnumber AS "objectnumber",
-co.fieldcollectionplace AS site,
+fieldcollectionplace.item AS site,
ong.objectName AS "objectname",
bd.item AS description,
oppp.objectproductionpeople AS productionpeople
LEFT OUTER JOIN hierarchy h3 ON (co.id = h3.parentid AND h3.primarytype='objectNameGroup' AND h3.pos=0)
LEFT OUTER JOIN objectnamegroup ong ON (ong.id=h3.id)
LEFT OUTER JOIN collectionobjects_common_briefdescriptions bd ON (bd.id=co.id and bd.pos=0)
+LEFT OUTER JOIN collectionobjects_common_fieldcollectionplaces fieldcollectionplace ON (fieldcollectionplace.id = co.id AND fieldcollectionplace.pos = 0)
left outer join hierarchy h4 on (co.id=h4.parentid and h4.pos=0 and h4.name='collectionobjects_common:objectProductionPeopleGroupList')
left outer join objectproductionpeoplegroup oppp on (oppp.id=h4.id)
left outer join hierarchy hlgl on (lic.id=hlgl.parentid and hlgl.pos=0 and hlgl.name='loansin_common:lenderGroupList')
loc.loanOutNote loanOutNote,
h1.name AS "csid",
co.objectnumber AS "objectnumber",
-co.fieldcollectionplace AS site,
+fieldcollectionplace.item AS site,
ong.objectName AS "objectname",
bd.item AS description,
oppp.objectproductionpeople as productionpeople
LEFT OUTER JOIN hierarchy h3 ON (co.id = h3.parentid AND h3.primarytype='objectNameGroup' AND h3.pos=0)
LEFT OUTER JOIN objectnamegroup ong ON (ong.id=h3.id)
LEFT OUTER JOIN collectionobjects_common_briefdescriptions bd ON (bd.id=co.id and bd.pos=0)
+LEFT OUTER JOIN collectionobjects_common_fieldcollectionplaces fieldcollectionplace ON (fieldcollectionplace.id = co.id AND fieldcollectionplace.pos = 0)
left outer join hierarchy h4 on (co.id=h4.parentid and h4.pos=0 and h4.name='collectionobjects_common:objectProductionPeopleGroupList')
left outer join objectproductionpeoplegroup oppp on (oppp.id=h4.id)
LEFT OUTER JOIN misc m ON (m.id = co.id)
end AS owner,
h1.name AS "csid",
co.objectnumber AS "objectnumber",
-co.fieldcollectionplace AS site,
+fieldcollectionplace.item AS site,
-- co.fieldcollectionnote fieldcollectionnote,
ong.objectName AS "objectname",
bd.item AS description,
LEFT OUTER JOIN hierarchy h3 ON (co.id = h3.parentid AND h3.primarytype='objectNameGroup' AND h3.pos=0)
LEFT OUTER JOIN objectnamegroup ong ON (ong.id=h3.id)
LEFT OUTER JOIN collectionobjects_common_briefdescriptions bd ON (bd.id=co.id and bd.pos=0)
+LEFT OUTER JOIN collectionobjects_common_fieldcollectionplaces fieldcollectionplace ON (fieldcollectionplace.id = co.id AND fieldcollectionplace.pos = 0)
left outer join hierarchy h4 on (co.id=h4.parentid and h4.pos=0 and h4.name='collectionobjects_common:objectProductionPeopleGroupList')
left outer join objectproductionpeoplegroup oppp on (oppp.id=h4.id)
left outer join hierarchy h5 on (oec.id=h5.parentid and h5.name='objectexit_common:exitDateGroup')