[jboss-user] [EJB 3.0] - Re: Mapping String attribute in EntityBean to CHAR(size) in

2007-03-26 Thread fheldt
I fixed this behavior with a simple UserType. Just annotate | import org.hibernate.annotations.Type; | ... | @Column(name = XYZ) | @Type(type = usertype.TrimmedStringType) | private String xyz; | The TrimmedStringType source is like this: | package usertype; | | import

[jboss-user] [EJB 3.0] - Re: Mapping String attribute in EntityBean to CHAR(size) in

2007-03-26 Thread [EMAIL PROTECTED]
Thanks a lot! That worked for my char-datatype. Do you have an idea how to deal with MEDIUMTEXT as (mysql) database type? What's the best java.sql.Type I can use for it? Thanks, Chris View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4031609#4031609 Reply to

[jboss-user] [EJB 3.0] - Re: Mapping String attribute in EntityBean to CHAR(size) in

2007-03-26 Thread [EMAIL PROTECTED]
Ok, this was an easy one @Column(length = 10) did the trick. Thanks! Chris View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4031614#4031614 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4031614

[jboss-user] [EJB 3.0] - Re: Mapping String attribute in EntityBean to CHAR(size) in

2007-03-25 Thread [EMAIL PROTECTED]
I have the same problem. There is a char(3) column in my mysql database I cannot change. What's the right java type I can map this to in my @Entity? char[], Character[] etc/ gives me an Varchar expected exception. Thanks, Chris View the original post :

[jboss-user] [EJB 3.0] - Re: Mapping String attribute in EntityBean to CHAR(size) in

2006-12-14 Thread andydale
Hi, Could you not just annotate the getter/variable with something like so: @Column(columnDefinition=VARCHAR2(size)) Cheers Andy View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3993767#3993767 Reply to the post :

[jboss-user] [EJB 3.0] - Re: Mapping String attribute in EntityBean to CHAR(size) in

2006-12-14 Thread [EMAIL PROTECTED]
The 'columDefinition' just helps the PersistenceProvider to set up the right DDL for the Table when you set it up to create the Tables at Deployment :-( But thanks View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3993877#3993877 Reply to the post :