java - Eclipse and Hibernate - faster and easier way to add mapping items in hibernate.cfg.xml -
i'm having problem lately adding mapping items hibernate.cfg.xml file. clear, it's not mystery me how generate mapping anotations , all, process of adding these classes hibernate.cfg.xml file takes long. instance, "hibernate configuration 3.0 xml editor" has bult-in function add mapping item in "session factory" tab. sadly, can add class once on time, means going "session factory" tab, hitting "add" button in mapping section , choosing class list.
ex.
<?xml version="1.0" encoding="utf-8"?> <!doctype hibernate-configuration public "-//hibernate/hibernate configuration dtd 3.0//en" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory name=""> <property name="hibernate.connection.driver_class">org.postgresql.driver</property> <property name="hibernate.connection.password">***********</property> <-don't mind <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/dvdrental</property> <property name="hibernate.connection.username">postgres</property> <mapping class="model.actor"/> <- here's problem. can generate automatically? </session-factory> </hibernate-configuration
>
is there more dynamic way in eclipse? couldn't "hibernate.cfg.xml" file updated after generated java files via "hibernate code generation configurations"? missing something?
p.s. i'm not using spring @ moment.
Comments
Post a Comment