Skip to content
New issue

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

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

Already on GitHub? # to your account

Error in command when using the formula property for CAST in DB2 #690

Open
LendaUrbana opened this issue May 23, 2024 · 0 comments
Open

Comments

@LendaUrbana
Copy link

I am using the mapping below with the formula property, to perform a CAST on a field in a DB2 database. However, when the command is generated, it is invalid because it is including the alias incorrectly as shown below.

Map(c => c.wdesc).CustomType().Formula("CAST(wdesc as VARCHAR(30) CCSID 37)").Length(30).Not.Nullable()

Same error
Map(c => c.wdesc).Formula("CAST(wdesc as VARCHAR(30) CCSID 37)").Length(30).Not.Nullable()

Field with command error
(CAST(ilm4_.wdesc as VARCHAR(30) ilm4_.CCSID 37))

The alias is being inserted in the CCSID and is not necessary in these cast cases

For working correct
(CAST(ilm4_.wdesc as VARCHAR(30) CCSID 37))

I'm using the latest versions of hibernate and fluence hibernate , and I tested with older versions and the same error occurs.

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

No branches or pull requests

1 participant