added type to BaseReference

This is desired because when the EntityRef for purchases inparticular can refer to Customer, Employee, or Vendor and currently only an id is returned. This means that there is not enough info to lookup the actual entity.