We're updating the issue view to help you get more done. 

Provide a PrimitiveByteArrayTypeDescriptor toString implementation

Description

Currently, if we have the following entity:

1 2 3 4 5 6 7 8 9 @Entity(name = "Image") public static class Image { @Id private Long id; @Column(name = "content") private byte[] content; }

When we try to persist and entity, the following log output is generated:

1 2 3 4 5 6 7 8 9 10:34:58,722 DEBUG SQL:92 - insert into Image (content, id) values (?, ?) 10:34:58,723 TRACE BasicBinder:65 - binding parameter [1] as [VARBINARY] - [[B@3f5478c8] 10:34:58,724 TRACE BasicBinder:65 - binding parameter [2] as [BIGINT] - [1]

The VARBINARY logged value is using the default java.lang.Object implementation, which is not very useful in this case.

We should provide a better toString() implementation for this.

Environment

None

Status

Assignee

Vlad Mihalcea

Reporter

Vlad Mihalcea

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Priority

Minor