Hibernate 6 UserType implementation methods not invoked when read data via Spring JPA Repository

Hi,
I am working on hibernate 5 to 6 migration on my spring boot project. where i see a behaviour, while read data via spring jpa repository, for some cases data some about cached some where, so the UserType implementation not getting triggered. below details provided

I have a entity class PortDetail which having multiple columns, few are custom type like Map as shown below

@Entity
@Table(name = "portdetail")
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Getter
@Setter
@ToString
public class PortDetail {

	@Id
	@Column(name = "orderid")
	private UUID orderId;

	@MapsId
	@Getter(AccessLevel.NONE)
	@Setter(AccessLevel.NONE)
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "orderid")
	private OrderInfo order;

	@Getter(AccessLevel.NONE)
	@Setter(AccessLevel.NONE)
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "customerid")
	private Customer customer;

       @Column(name = "meta")
	@Type(value = MapJsonbType.class)
	private Map<String, String> meta;
}

variable meta is a custom object , so annotated with @Type(value = MapJsonbType.class) and have below implementation like below

public class MapJsonbType implements UserType<Map> {

    private final ObjectMapper mapper = getObjectMapper();

    @Override
    public int getSqlType() {
        return SqlTypes.JSON;
    }

    @Override
    public Class<Map> returnedClass() {
        return Map.class;
    }

    @Override
    public boolean equals(Map map, Map j1) {
        return Objects.equals(map, j1);
    }

    @Override
    public int hashCode(Map map) {
        return map == null ? 0 : map.hashCode();
    }

    @Override
    public Map nullSafeGet(ResultSet resultSet, int i, SharedSessionContractImplementor sharedSessionContractImplementor, Object o) throws SQLException {
      
        try {
            return mapper.readValue(cellContent.getBytes(StandardCharsets.UTF_8), returnedClass());
        } catch (final Exception exception) {
            throw new HibernateException("Failed to convert String to Invoice: " + exception.getMessage(), exception);
        }
    }

    @Override
    public void nullSafeSet(PreparedStatement st, Map value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException {
        if (Objects.isNull(value)) {
            st.setNull(index, Types.OTHER);
            return;
        }
        try {
            final var writer = new StringWriter();
            mapper.writeValue(writer, value);
            writer.flush();
            st.setObject(index, writer.toString(), Types.OTHER);
        } catch (final Exception exception) {
            throw new HibernateException("Failed to convert Invoice to String: " + exception.getMessage(), exception);
        }
    }

    @Override
    public Map deepCopy(Map value) throws HibernateException {
        try {
            final var byteArrayOutputStream = new ByteArrayOutputStream();
            final var outputStream = new ObjectOutputStream(byteArrayOutputStream);
            outputStream.writeObject(value);
            outputStream.flush();
            outputStream.close();
            byteArrayOutputStream.close();
            final var byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
            return (Map) new ObjectInputStream(byteArrayInputStream).readObject();
        } catch (final ClassNotFoundException | IOException exception) {
            throw new HibernateException(exception);
        }
    }

    @Override
    public boolean isMutable() {
        return true;
    }

    @Override
    public Serializable disassemble(Map value) {
        return (Serializable) this.deepCopy(value);
    }

    @Override
    public Map assemble(Serializable cached, Object owner) throws HibernateException {
        return this.deepCopy((Map) cached);
    }

    @Override
    public Map replace(Map original, Map target, Object owner) throws HibernateException {
        return this.deepCopy(original);
    }
}

And to read data we have basic Spring JPA respository configured , through that we read data from database
portDetailRepository.findById(id).

So, for ex, If inside portdetail table if the meta is set as null , the expectation is when we try to hit the above findById repository method, meta object will be pass through nullSafeGet method and value should have a empty map instance will be created.

But while actually running the application and reading the data via spring jpa , meta is returns as null.
I tried to debug the application looks like nullSafeGet does not get invoked and returns from any cached information.
Same changes works for hibernate 5.

Kindly help to provide some suggestion how to solve this problem ?
.

Please try to create a reproducer with our test case template (hibernate-test-case-templates/orm/hibernate-orm-6/src/test/java/org/hibernate/bugs/JPAUnitTestCase.java at main · hibernate/hibernate-test-case-templates · GitHub) and if you are able to reproduce the issue, create a bug ticket in our issue tracker(https://hibernate.atlassian.net) and attach that reproducer.