keep track of the original extend class to prevent wrong scopes in query method in case of STI