views:

300

answers:

0

I'm using JPA (Hibernate) and jTDS as my jdbc driver. Whenever the datatype of my entity columns are String, the created prepared statement uses varchar(8000) as its parameter. I've already tried to use @Column(length=50) in my mappings for example, but it seems to be ignored.

If I set sendStringParametersAsUnicode in jTDS connection, it uses nvarchar(4000) instead, but never respects the lentghs I define in my entities. Is there a reason for that?