Hi,
I create a sql file with the following create table command:
(create table if not exists Table (FLAGS BINARY(2) NOT NULL,...).
I use it as schema file, create a dataSource and a spring's JdbcTemplate with it, that I use to insert and select information from the table.
Everything was working OK, except this:
When inserting a byte[] with any value != 00 the insert is ok, but if the byte [] contains 00 the value inserted is null. The NOT NULL constraint seems to have no effect.
Worse: retrieving such data returns null instead the expected byte[].
Is this the expected behaviour? I noticed that querying through Admin server the column shows object references.
Thanks in advance.
Rodolfo Martin
|
Dear Rodolfo Martin,
Yeah. HXTT Text will take a value stuffed with '\0' as null value for binary type and varbinary type. NULL/NOT NULL constraint is ignored by HXTT Text now. A value stuffed with space characters is null value for char type and varchar type too.
With best regards,
Dai Wei
|
The latest package won't rtrim value or return null value for char type and binary type now.
|