I have entity class Page with column type=integer. When I do:
Page
type=integer
You certainly found your solution, but another way to do this would be to create a parent class and inherit using inheritance mapping. You are then able to have different repository and sonata admin would not work differently.