problem with hibernate and mapped entity

Connectivity

problem with hibernate and mapped entity

I Everybody,

I have to migrate an application from oracle to teradata DB.

This is a web application running on weblogic with spring+hibernate(with dialect from hibernate) with teradata last JBDC, using teradata vmware express edition.

Everything is up and running but when hibernate load into an string entity the value found in the db, it seems that load a series of spaces as much as field lenght specified in the db.

also when i access the data with SQLA and try to write in the proper column the string without space i notice that SQLA add spaces aribitrary. this is the result uotput that i get using the UI of SQLA when i set the value '100' in the column:

update "CONFIGURATION" set "VALUE_FIELD"='100' where "NAME"='TIMEOUT ...'

is that normal? i a matter of general db configuration?

thanks for support.

T
1 REPLY
Senior Apprentice

Re: problem with hibernate and mapped entity

You didn't show the output, but i assume there were some blanks :-)

Of course i assume that the target column is defined as VARCHAR instead of CHAR.

Teradata doesn't append trailing blanks on it's own, it just stores VARCHARs "as is".

Could you switch on query logging to see what query is actually sent to Teradata?

Dieter