kusanagihk wrote:
The 1st thing is that the plugin just create an incomplete cfg.xml file, eg. the mapping resources are not attached (though I'm not sure if the plugin could attach these information automatically or not)
Well, when you create a cfg.xml then it is assumed you are starting from scratch and thus doesn't have any hbm.xml.
If you already have a cfg.xml why don't you just use that ?
note: selecting cfg.xml generation in the exporter will generate a cfg.xml with mappings.
Quote:
The 2nd thing is that in order to run the program; I need to add back the <mapping /> tags; and a tag on
<property name="current_session_context_class">thread</property>
again, I am not sure if all these entries could be handled by the plugin or not (like there is some action triggered to integrate the .hbm.xml file information to the .cfg.xml file)
Again, you are saying "add back" as if you already had a cfg.xml so why did you not just use that ?
Maybe you are looking for a feature of autoscanning the projects for hbm.xml and have us auto-add that ? That could possibly be done yes; an alternative is to use hibernate entitymanager to get runtime autoscanning so you don't need to add them at all.
Quote:
The 3rd thing is within the hibernate console perspective; I could not execute HQL since hibernate.cfg.xml is incomplete at the first place; after adding back the <mapping/> tags, things seem to be much better, but still I can't execute HQL --> errors like " customer is not mapped " still occured
If customer is not mapped then its because customer is not mapped....something is missing in the mappings.
/max