Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-377

org.mariadb.jdbc.Driver EnumType cannot load ordinal

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Cannot Reproduce
    • 1.5.4
    • N/A
    • Other
    • None

    Description

      In hibernate, we have

      <property name="shipmentStatus" column="shipment_status">
      			<type name="org.hibernate.type.EnumType">
      				<param name="enumClass">com.packloop.core.common.Constants$ShipmentStatus</param>
      			</type>
      		</property>
      

      If we use mariadb JDBC, we will get SQL ERROR:

      Incorrect integer value: 'IN_TRANSIT' for column 'shipment_status' at row 1

      Because, we set int for column shipment_status. mariadb JDBC didn't use IN_TRANSIT' ordinal as value.

      If we switch JDBC to Mysql Connector/J, the SQL will insert ordinal value to database.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            yuchenghu YuCheng Hu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.