Joined: Thu Jun 23, 2005 12:25 pm Posts: 7
|
I have a table with two relationships coming in from another table. The foreign keys are named test1_id and test2_id in the database. In my reverse engineering file I have this to generate test1 and test2. Hibernate isn't generating either of these two it comes up with its own naming. Does anyone know where this is coming from?
hibernate.reveng.xml
<table schema="SOAUSER" name="CLASS" class="Class">
<primary-key>
<generator class="sequence"></generator>
<key-column name="class_Id" type="Integer" />
</primary-key>
<column name="Test1_ID" property="test1" type="Integer"/>
<column name="Test2_ID" property="test2" type="Integer"/>
</table>
Generated Code
private Integer classId;
private Test testByTest1Id;
private Test testByTest2Id;
I looked at the definition in the database to see if there is extra notes that are being carried along.
Any ideas on how to change the column names to what you want them to be? Or in this case, what the database and mapping file says that it is.
Thank you.
|
|