Joined: Mon Nov 17, 2003 10:53 am Posts: 15
|
hi,
i know this is no fault of hibernate but maybe somebody
knows are workaround using hibernate.
i am using postgres (but this is certainly a 'feature' of
many dbs). sometimes i get the following exception
"value too long for type character varying" which happens
exactly in cases when the value i want to save is longer
than specified on the db. depending on your point of view
this might be ok or not. im my case it is not. what i want is
to simply cut off the value at max size and be done.
no exceptions please ;-)
does anybody know how to workaround this either
by hibernate or by using the postgres jdbc driver or
whatever.
btw. i would find an attribute on the property element
way cool. so one would be able to respecify the facts
on the db table.
<property name="foo" lenght="10">
this would drop everything greater than 10 chars long.
ciao robertj
ps: my best bet at the moment would be to use
aspectj but it would "feel" more natural doing this as close
to the db as possible.
|
|