handle returning id with getter for haveRecord()

I added a case to return id from getter using standard convention "getId()" if id property is protected or private.