Mouna
Mouna

Reputation: 3359

How to tell hibernate tools to generate classes with the same name of my database tables?

I use eclipse hibernate tools to generate classes from database tables. But I get classes names different from those of my database. For example I have a table that I call OT_XML in my database and the generated java class is called OtXml.

I have a lot of columns in each table ( around 50 columns) so I can't specify by hand the name needed for each column.

Is there a way to tell hibernate tools to respect the same names of tables and attributes?

Upvotes: 1

Views: 236

Answers (1)

Zsolt Süli
Zsolt Süli

Reputation: 316

You need a custom ReverseEngineeringStrategy to achieve that.

Upvotes: 1

Related Questions