Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hibernate + Middlegen + Code generation

843859Dec 15 2005
I use Hibernate and Middlegen for working with Oralce database. Middlegen generated java classes successfully. But I want to add some new methods and attributes to it. Can I specified that modification and apply it every time when I regenerate classes?
For example: it generates class A:

public class A {
private BigDecimal xmlFile;
public A() {};
// ...
}

and i want to generate class as

public class A {
BigDecimal xmlFile;
// new property that is not mapped on the database.
int new_prop;
public A() {
// read data from file and specify new_prop.
new_prop = 2;
}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2006
Added on Dec 15 2005
0 comments
171 views