This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes MiddleGen generate relations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "MiddleGen generate relations" Watch "MiddleGen generate relations" New topic
Author

MiddleGen generate relations

Stas Sokolov
Ranch Hand

Joined: Apr 13, 2004
Posts: 117

MiddleGen generates DTO and mapping files for Hibernate. Bisides defining all properties it generates full bunch all relations whenever it is necessary or not. Could this default behaviour be changed. I read all the docs available on middlegen web site and didn't find any clue that can help to solve the problem. Is everybody aware how this issue could be fixed?


Good luck for yourself.
Munish Dabra
Greenhorn

Joined: Nov 18, 2003
Posts: 19
well as far my understanding it is not issue..
you can always control what middlegen creates using ANT.

Their are two ways of solving this..

1) using ant task

<many2many>
<tablea generate="true" name="LIBRARY" />
<jointable name="LIBRARY_BOOK" generate="false" />
<tableb generate="true" name="BOOK" />
</many2many>

2) or u can control by table ...

<table name="LIBRARY"></table>
now middlegen should generate mapping files for only LIBRARY table.and you can always add more <table> tags for more tables.

I hope that helps


Munish Dabra<br />SCJP , SCWD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MiddleGen generate relations
 
Similar Threads
Unique Uses of XDoclet
Data model to Object model
One Mapping for two tables
Struts with EJB and WebService....possible!!!
middlegen, dash/hyphen, underscore sign