Hi,
We have been using the Ant task successfully for generating our reverse engineered entity beans. It has worked like a dream and we have been able to forget about the database almost completly.
The only issue is that there does not seem to be support for a spring config file. For instance the following is what I would like the reverse engineer to write to.
Code:
<!-- Hibernate SessionFactory -->
<bean id="exampleSessionFactory"
class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="exampleDataSource"/>
</property>
<property name="hibernateProperties">
<ref bean="exampleHibernateProperties" />
</property>
<!-- OR mapping files. -->
<property name="mappingResources">
<list>
<value>Customer.hbm.xml</value>
<value>Account.hbm.xml</value>
</list>
</property>
</bean>
Although we are successfully using the hibernate.cfg.xml it does seem neater to use the spring integration.
Does anyone have any tips or should I copy out the reverse engineered mappings into the spring config file?
Thanks
Nick