Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUID to HANA column type mapping #63

Open
pradu2 opened this issue May 6, 2021 · 0 comments
Open

UUID to HANA column type mapping #63

pradu2 opened this issue May 6, 2021 · 0 comments

Comments

@pradu2
Copy link

pradu2 commented May 6, 2021

Hi,

I'm having issues with the mapping of UUID to the native .

My changeset is something like this :

<changeSet id="mt-base-0001" author="initial">
 	<createTable tableName="some_table" >
 		<column name="id" type="UUID">
 			<constraints nullable="false" primaryKey="true" primaryKeyName="some_table_pk"/>
 		</column>
        </createTable>
<changeSet>

Database is HANA 2, on-prem.
The id column is created as VARCHAR(36).
As the ids are generated by Hibernate, it sometimes fails, with exception SAP DBTech JDBC: [274]: inserted value too large for column: Failed in "ID" column with the value .... .

As a workaround, I created a custom UUIDType with higher priority which maps UUID to VARBINARY(16).

Shouldn't this be also the mapping in this library, as the core or other dialects map it to either a UUID type (core, H2, Postgres)?

Note: I know that I could put there VARBINARY(16) as a type in the changeSet, but we're using H2 and Postgres in parallel and it would have invalidated the common changelog hashes.

Kind regards,

Radu

┆Issue is synchronized with this Jira Bug by Unito

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant