From your problem, I think I have two main causes that might produce the IP address not properly converting, remaining an integer:
From my experience with Hibernate, some versions may not fully support the @ColumnTransformer
annotation for certain queries. I researched a bit on the topic, and it seems like Hibernate 5.4+ fully supports this annotation, according to this documentation: https://docs.jboss.org/hibernate/orm/5.4/javadocs/org/hibernate/annotations/ColumnTransformer. Here, it describes the usage of @ColumnTransformer
annotation in Hibernate 5.4, resulting that it supports it.
Native queries tend to work better with this kind of annotation. I suggest also trying to create your query something like:
Query query = entityManager.createNativeQuery("SELECT INET_NTOA(ip) as address, port, nickname FROM printers", PrinterEntity.class);
List<PrinterEntity> printers = query.getResultList();