DBMS binary type for MySQL and MariaDB - BLOB vs LONGBLOB

  • Versions
    • Jmix framework: 2.8.1
    • Jmix Studio: 2.8.1-261
    • Idea Ultimate 2026.1.2

After modeling an entity with a byte-array property, some Liquibase root changelog variables were inserted:

<property name="byte[].type" dbms="mysql" value="BLOB"/>
<property name="byte[].type" dbms="mariadb" value="BLOB"/>

Since the content written might be larger, I changed the value to LONGBLOB manually.

I continued modeling and the value become changed back to BLOB. Is LONGBLOB not supported by Jmix and/or Liquibase?

I found a similar issue but it was related to Jmix 1.3: Liquibase changelogs should define LONGBLOB SQL type for byte[] entity attributes (MySQL and MariaDB) · Issue #648 · jmix-framework/jmix · GitHub

Hi,

Thank you for your feedback.

You are correct — LONGBLOB should be created, as described in the GitHub issue. However, the fix for issue #648 only changed the database type used in Liquibase changelogs provided by the Jmix framework itself. The Liquibase changelog generation in Studio was not updated accordingly.

We have created a YouTrack issue for this inconsistency, and a fix will be included in an upcoming Studio release.

Until the fix is available, you can use the Type Mappings settings in Studio to configure the correct database type:

  1. Open Jmix Plugin Settings from the Jmix toolbar (gear icon).

  2. Select Type Mappings.

  3. Add a mapping for byte[] and specify LONGBLOB as the database type for MySQL and MariaDB.

Thank you for reporting this issue.

1 Like