BMFO versions 1.2.0 to 1.2.2 were inserting superfluous installation records upon data entry of operation records. To overcome this problem, verify that you have only installation records for the "Unknown" meter:
select distinct EquipmentOID from InstallationRecordIf the query only returns "Unknown", delete the superfluous installation records with the following query:
delete from InstallationRecord where ID in (select ID from Installationrecord i where RecordDate > (select min(i2.RecordDate) from InstallationRecord i2 where i.NetworkOID = i2.NetworkOID))
You should also make sure that there is at least one installation record for every meter location that has operation records:
insert into InstallationRecord (select NetworkOID, 1, 'Unknown', '', ID, installationrecordid.nextval, RecordDate from OperationsRecord o where NetworkOID in (select OperationsRecord.NetworkOID from OperationsRecord left outer join InstallationRecord on InstallationRecord.NetworkOID = OperationsRecord.NetworkOID where InstallationRecord.NetworkOID is null) and RecordDate in (select min(RecordDate) from OperationsRecord o2 where o.NetworkOID = o2.NetworkOID) and ID = (select min(ID) from OperationsRecord o3 where o.NetworkOID = o3.NetworkOID and o.RecordDate = o3.RecordDate));
To upgrade the application, do the following:
Run the BMFO installer and select the "BMFO" and "Update" components.
Update the servlet.