Provide a PrimitiveByteArrayTypeDescriptor toString implementation

Description

Currently, if we have the following entity:

@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:

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.

Activity

Show:

Former user June 13, 2016 at 8:29 PM

Closing after applying label.

Former user June 13, 2016 at 8:29 PM

Reopening to apply label.

Vlad Mihalcea May 31, 2016 at 9:54 AM

Would you like to add this to 5.0 too?

Vlad Mihalcea May 31, 2016 at 9:31 AM

Add a fix starting from the PR suggestions.

Fixed

Details

Assignee

Reporter

Labels

Fix versions

Priority

Created May 31, 2016 at 8:06 AM
Updated June 13, 2016 at 8:30 PM
Resolved June 13, 2016 at 8:29 PM