Subject Re: [Firebird-Java] Re: Jaybird and XWiki
Author Mark Rotteveel
On 6-11-2012 13:13, the_a_rioch wrote:
>
>> Yes, I meant the hibernate dialect. I first thought part of the problem
>> was the absence of mapping some java.sql.Types entries in the
>> FirebirdDialect included in Hibernate, but it probably wasn't.

> Well, i cannot check this, but if they really were missed and inheritance did not worked, then probably adding them would be good thing even if not required for XWiki compatibiltiy

Jaybird maps Firebird BLOB and BLOB SUB_TYPE TEXT to
java.sql.Types.LONGVARBINARY and LONGVARCHAR (even though you can also
access them as a Blob or Clob), while the dialect included in Hibernate
maps to java.sql.Types.BLOB and CLOB. It turned out that wasn't the
problem though.

It is my intention to release that updated dialect (and to get it
included in Hibernate), but it still needs some additional work.

> PS. and i hope u make some notes, that could be published later for other Java programmers that had never before saw FB

For XWiki it was mostly a matter of changing the mapping of some
columns: a few to make them fit in combination with character set UTF8.
With UTF8 you can't have a VARCHAR(8192) column, because to Firebird
that is 32768 bytes and 32766 bytes is the max for varchar as it also
needs 2 bytes for the length (or something close to that number). And of
one table I had to change some columns to make sure the total row size
did not exceed 64k.

For now I have changed those simply to a blob, but for those
VARCHAR(8192) columns I will probably change to VARCHAR(8191) if that
doesn't make the row too big, and for the table I will try to change
some of the columns back to the original definition, because blobs
aren't really efficient.
--
Mark Rotteveel