I have a little problem using Hibernate with a char (6) column in Oracle. Here is the table structure:
CREATE TABLE ACCEPTANCE
(
USER_ID char(6) PRIMARY KEY NOT NULL,
ACCEPT_DATE date
);
For records whose user ID is less than 6 characters, I can select them without populating the user ID when executing queries using SQuirreL. I.E. the following returns a record if there is a record with user ID "abc".
select * from acceptance where user_id = "abc"
Unfortunately, when making a selection through Hibernate (JPA), the following returns null:
em.find(Acceptance.class, "abc");
If I inserted this value, it will return the correct entry:
em.find(Acceptance.class, "abc ");
, , , . Hibernate , , Hibernate? ( , - )