Reputation: 31
This query:
db.Where(&ArchivedImage{DocID: docId}).First(&image) //"doc_id = ?", docId).Find(&image)
Which is looking for an archived image and nothing was returned other than a "record not found".
the logfile shows this:
/Users/dhf/work/development/cadatabase/archived_images.go:60 record not found
[90.433ms] [rows:0] SELECT * FROM "clinical_documents" WHERE id = 4409769 AND id = 4409769 AND "clinical_documents"."id" = 4409769 AND "clinical_documents"."doc_id" = 4409769 ORDER BY "clinical_documents"."id" LIMIT 1
It is a differeent table entirely with several more query paraneters. This one is querying ClinicalDocuments where the original query was for an ArchivedImage. The ID is orpoer and is called docId
Both table types are valid though should not be substituted
I expect to receive the one document immage record for the specified DocumentReference. I have tried with Find and FindFirst. I have tried other queries a while ago on a previous vefsion. I just updated the package today aand still has the problem. The record has been verified to be in the database. I will be writing a directr postgress query in go toe check that out.
Upvotes: 1
Views: 38