[jboss-dev-forums] [JBoss Tools Development] - Configure Field-length for Hibernate Reverse Engineering
Norman Schulze
do-not-reply at jboss.com
Tue Aug 13 09:08:17 EDT 2013
Norman Schulze [https://community.jboss.org/people/nosc82] created the discussion
"Configure Field-length for Hibernate Reverse Engineering"
To view the discussion, visit: https://community.jboss.org/message/832491#832491
--------------------------------------------------------------
Hi,
I'm using Hibernate Tools for generating POJOs of my Oracle Database. Generally, you can configure the behavior for the reverse engeneering process in the file 'hibernate.reveng.xml'. But it's not possible to configure the length of a VARCHAR column.
I need this, because I created a column with: create table table_name(column_name varchar2(*50 char*)). The resulting length in the database is 200 bytes, because the database is using UTF-8 encoding. One character needs between 1 to 4 bytes.
The generated POJO-class is annotated with
@Column(name="COLUMN_NAME", *length=200*)
public String getColumnName() {
return this.columnName;
}
Is there an opportunity for adjusting the resullting length? If not, it would be nice to have the option to configure this. Although writing my own ReverseEngineeringStrategy wasn't successfull.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/832491#832491]
Start a new discussion in JBoss Tools Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2129]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130813/5696d96c/attachment.html
More information about the jboss-dev-forums
mailing list