Dear colleagues,
I'm creating a table like that:
CREATE TABLE IF NOT EXISTS T_EXAMPLE.CSV (TN_ID NUMERIC(18,0) NOT NULL...)
Currently when I insert a record in that table where the id is less than 18 digits, it completes the remaining digits with spaces. So what I see in the CSV file is:
1239 ;XXX;.....
This is causing a lot of troubles because when I afterwards retrieve this record by id to update it, Hibernate does not recognise it and creates a new record in the table.
The NUMERIC(18,0) should mean that this is the maximum length of the field but it should not modify the field with spaces until it reaches this length. Is there any way of avoiding this behaviour?
Regards,
Carmen
|
You can use TN_ID int not null
|
But this will suppose changin all my hibernate mapping files and POJOs. Is there no way to maintain the data type but avoid the automatic insertion of blank spaces?
|
Supported in the latest package.
|