wood burning stoves
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
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "MiddleGen generate relations" Watch "MiddleGen generate relations" New topic

MiddleGen generate relations

Stan Sokolov
Ranch Hand

Joined: Apr 13, 2004
Posts: 120

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

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

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

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
It's not a secret anymore!