We have in DB two books, first is loaned because it has the Friend ID, and the other is in the shelf.
I execute a class query to get all loaned books:
Query BooksLoaned() As %SQLQuery
{
SELECT *
FROM Library.Book
WHERE Friend IS NOT NULL
}
Which I have tested throught the portal:
My task is to retrieve all the loaned books and return them in an array. Method code:
ClassMethod GetLoanedBooks() As %ArrayOfObjects
{
set booksRS = ##class(%ResultSet).%New("Library.Book,BooksLoaned")
set rsStatus = booksRS.Execute()
set i = 1
s




