How to NOT use databaseId in MyBatis?

896 Views Asked by At

I'm using databaseIdProvider like this.

<databaseIdProvider type="DB_VENDOR">
  <property name="SQL Server" value="sqlserver"/>
  <property name="DB2" value="db2"/>
  <property name="Oracle" value="oracle"/>
  <property name="Apache Derby" value="derby"/>
</databaseIdProvider>

And I use the value like this.

<selectKey keyProperty="id" resultType="_long" order="BEFORE">
  <choose>
    <when test="_databaseId == 'derby'">
      VALUES NEXT VALUE FOR ENTRY_ID_SEQ
    </when>
    <otherwise>
      SELECT ENTRY_ID_SEQ.NEXTVAL FROM DUAL
    </otherwise>
  </choose>
</selectKey>

My question is how can I use the full product name not the database id? Say not derby but Apache Derby?

0

There are 0 best solutions below