There is a table whose primary key is of type CHAR(3) and there are some records in this table having less than three characters in primary key column. Here is the example.
Table name: REF_CCY
Primary Key: ccy_cd
There are two records.
1. "AUD"
2. "XX"
When I query the first record like this
Code:
Session session;
session.get(RefCcy.class,"AUD")
I can get what I what.
However, when I query the second record
Code:
session.get(RefCcy.class,"XX")
I can get nothing except a null pointer!
If I change the type of CHAR(3) to VARCHAR2(3), this problem would arise. Could you please tell me what I should do with the type CHAR?Many thanks![/code]