Fixed bug in ActiveRecordBase when generating GridView

Fixed bug in ActiveRecordBase when generating GridView - not mapping the
correct column on ref fields