Hi all
I've got a CLOB field (DB type 'TEXT') on one of my tables. For one query, I need to use this field in a group-by statement (yes, this in itself suggests a questionable design, but we don't live in a perfect world). Using Sybase ASE, the DBMS does not allow for TEXT columns in a group by clause. Therefore, I'd like to cast the field to a varchar. If I use
Code:
cast(tbl.MYCLOBFIELD, string)
Hibernate will translate that to a cast to VARCHAR(255). What is required to force a cast to VARCHAR(1024) (or any length other than 255)?
I assume it doesn't matter, but in the HBM my field is mapped as:
Code:
<property name="clobField" type="string" column="MYCLOBFIELD" />
Thanks a lot
Simon Niederberger