-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate-reveng.xml (Controlling reverse engineering)
PostPosted: Wed Oct 22, 2014 9:31 am 
Newbie

Joined: Tue Oct 21, 2014 5:09 pm
Posts: 1
Hello, I need help, I am working on Hibernate-reveng.xml
I have 2 tables that are related with a composite PK.
I need to modified the reveng.xml file to automatically generate the POJOs with object reference in them.
I have done it but it doesn't have object reference in them. Here below is the reveng.xml I have manually created.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>

<schema-selection match-schema="employees" match-table="dept_emp"/>
<schema-selection match-schema="employees" match-table="employees"/>

<table schema="employees" name="dept_emp">

<primary-key>

<generator class="native">
<param name="dept_emp">dept_emp_dept_no_seq</param>
</generator>
<key-column name="dept_no" />
<key-column name="emp_no"/>
</primary-key>

<column name="from_date" property="fromDate" type="date" />
<column name="to_date" property="toDate" type="date" />

</table>

<table schema="employees" name="employees">
<primary-key>
<generator class="native">
<param name="employees">employees_emp_no_seq</param>
</generator>
<key-column name="emp_no" />
</primary-key>


<column name="birth_date" property="birthDate" type="date" />
<column name="first_name" property="firstName" type="string" />
<column name="last_name" property="lastName" type="string" />
<column name="gender" property="Gender" type="string" />
<column name="hire_date" property="hireDate" type="date" />

</table>

</hibernate-reverse-engineering>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.