This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes [hibernate tools] exclude table, but let other entities see it Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[hibernate tools] exclude table, but let other entities see it" Watch "[hibernate tools] exclude table, but let other entities see it" New topic
Author

[hibernate tools] exclude table, but let other entities see it

Dragan Jovanovic
Greenhorn

Joined: Feb 07, 2008
Posts: 15
I am using hibernate tools reverse engeenering mechanism to (re)generate hibernate entities from relational model. Because of frequent changes I do not want to regenerate whole database every time, but to regenerate some segments of it.
But, when I define what tables to include/exclude in job (either in excludeTable() method of my custom ReverseEngineeringStrategy class, or in reveng.xml file), hiernate tools totally ignores excluded tables. That means, it ignores foreign keys to that table in included tables. For example, if I have table excluded, and table included, hibernate tools will make entity Post with an attribute , not an attribute .
How can I make it to generate that User user attribute, but not to regenerate User entity ?
 
GeeCON Prague 2014
 
subject: [hibernate tools] exclude table, but let other entities see it