Add query property to the BASE database model class for convenience

Change-Id: Icd33e5379f8978b4a663d7b3722474847600265b
Merge "Add query property to the BASE database model class for convenience"