VARBINARY should map to byte[] under H2

Bug #798958 reported by cowwoc on 2011-06-17
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

2.2.0-beta4 maps VARBINARY to BLOB, but under H2 VARBINARY should actually map to byte[]. See

cowwoc (gili) wrote :

On second thought, I don't necessarily mind the usage of BLOB. It has the benefit of providing a consistent interface to binary data across all databases. simply invoked:

byte[] data = blob.getBytes(0, (int) blob.length());

According to the docs, Blob is valid as well. You can override the default mappings in Querydsl SQL.

Changed in querydsl:
status: New → Opinion
cowwoc (gili) wrote :

According to which docs (can you provide a link)?

Sorry, I misread. I mixed the SQL type BLOB with the Java type Blob. You are right about this.

Changed in querydsl:
status: Opinion → In Progress

Fixed in SVN trunk :

        // byte[]
        registerDefault(Types.BINARY, byte[].class);
        registerDefault(Types.LONGVARBINARY, byte[].class);
        registerDefault(Types.VARBINARY, byte[].class);

        // BLOB
        registerDefault(Types.BLOB, Blob.class);

Changed in querydsl:
status: In Progress → Fix Committed

Released in 2.2.0.beta5

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers